Operators, comments, delimiters

For SQL*Plus and PL/SQL

Comparison Operators:

   NOT   IS NULL   LIKE   BETWEEN   IN   AND   OR
   +  -  * / @  ;  =  <>  !=  ||  <=   >=

Comments
   -- comment
   /* comment */ 
   << Begin label - end label >>

Assignment operator
   :=
   You can assign values to a variable, literal value, or function call 
   but NOT a table column.

Exponential operator (valid for plsql only)
   ** 

Delimiters
 Item separator . 
 Character string delimiter '
 Quoted String delimiter "
 Bind variable indicator :
 Attribute indicator %
 Statement terminator  ;

Functions
   All SQL functions that return a single row can be used in 
   a plsql procedural statement. Group and DECODE functions are
   not supported.

Examples

v_myDate := TO_DATE('01-OCT-2001',DD-MON-YYYY)
The TO_DATE is required because date formats are region specific.

new in oracle 8i is 
v_mychar := '01-OCT-2001'
Previous versions need a to_char()

Assigning values to a RECORD TYPE or ROWTYPE variable
use dot notation to specify the field:

   job_record.jobname := 'Test Job';


Related:


© Copyright SS64.com 1999-2014
Some rights reserved