InterviewSolution
Saved Bookmarks
| 1. |
How to use LIKE operator in PL/SQL? |
||||||||
|
Answer» The FOLLOWING are the methods AVAILABLE in PL/SQL to TRIM characters:
The following is how you can use LTRIM() in PL/SQL to trim characters from the left: DECLARE cars VARCHAR2(30) := '......Bentley.....'; BEGIN dbms_output.put_line(LTRIM(cars,'.')); END; /The output: Bentley.....The following is how you can use RTRIM() in PL/SQL to trim characters from the right: DECLARE cars varchar2(30) := '......Bentley.....'; BEGIN dbms_output.put_line(RTRIM(cars,'.')); END; /The output: ......BentleyThe following is how you can use TRIM() in PL/SQL to trim characters from the right and left: DECLARE cars varchar2(30) := '......Bentley.....'; BEGIN dbms_output.put_line(TRIM(cars,'.')); END; /The output: Bentley |
|||||||||