Quoting syntax is q'[ ... ]' where the [] is the user-defined : Quote « Select Query « Oracle PL / SQL






Quoting syntax is q'[ ... ]' where the [] is the user-defined

    
SQL>
SQL>
SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE('Colorado''s National Parks are BEAUTIFUL');
  3  END;
  4  /
Colorado's National Parks are BEAUTIFUL

PL/SQL procedure successfully completed.

SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE(q'!Colorado's National Parks are BEAUTIFUL!');
  3  END;
  4  /
Colorado's National Parks are BEAUTIFUL

PL/SQL procedure successfully completed.

SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE(q'[Colorado's National Parks are BEAUTIFUL]');
  3  END;
  4  /
Colorado's National Parks are BEAUTIFUL

PL/SQL procedure successfully completed.

SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE(q'<Colorado's National Parks are BEAUTIFUL>');
  3  END;
  4  /
Colorado's National Parks are BEAUTIFUL

PL/SQL procedure successfully completed.

SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE(q'%Colorado's National Parks are BEAUTIFUL%');
  3  END;
  4  /
Colorado's National Parks are BEAUTIFUL

PL/SQL procedure successfully completed.

   
    
    
    
  








Related examples in the same category

1.Alternative Quoting Mechanism in Oracle 10g: two quotes really means one quote
2.q'{32 O'Hara Avenue}'): Use a 'q' as the leading character after the parentheses
3.Quoted Identifiers
4.Using two single-quotes print the string correctly