Default Value

Global variables can have literal, NULL, or system constant default values.
Read syntax diagramSkip visual syntax diagram
Default Value

                        (1)                                
|--+-| Literal Number |--------------------------------+--------|
   |                   (2)                             |   
   +-| Quoted String |---------------------------------+   
   |                      (3)                          |   
   +-| Literal Interval |------------------------------+   
   |                      (4)                          |   
   +-| Literal Datetime |------------------------------+   
   +-+-CURRENT-+--+----------------------------------+-+   
   | '-SYSDATE-'  |                              (5) | |   
   |              '-| DATETIME Field Qualifier |-----' |   
   '-+-CURRENT_USER-+----------------------------------'   
     +-DBSERVERNAME-+                                      
     +-SITENAME-----+                                      
     +-TODAY--------+                                      
     +-USER---------+                                      
     '-NULL---------'                                      

Notes:
  1. See Literal Number
  2. See Quoted String
  3. See Literal INTERVAL
  4. See Literal DATETIME
  5. See DATETIME Field Qualifier

If you specify a default value, the global variable is initialized with the specified value.


Copyright© 2021 HCL Technologies Limited