InterviewSolution
Saved Bookmarks
| 1. |
How to include single quotes in a string literal in PL/SQL? |
|
Answer» The BETWEEN operator in PL/SQL checks whether a value lies in a specified RANGE or not. For example, the value a BETWEEN x AND y says that a >= x and a <= y. Let US see an example: DECLARE val NUMBER(2) := 3; BEGIN IF (val between 1 and 5) THEN dbms_output.put_line('True'); ELSE dbms_output.put_line('False'); END IF; END; /The output: TrueLet us see another example: DECLARE val number(2) := 15; BEGIN IF (val between 1 and 10) THEN dbms_output.put_line('True'); ELSE dbms_output.put_line('False'); END IF; END; /The output: False |
|