8. SQL Statements : SET : Syntax
 
Share this page                  
Syntax
The SET statement has the following format:
[EXEC SQL] SET AUTOCOMMIT ON | OFF
[EXEC SQL] SET [NO]BATCH_COPY_OPTIM
[EXEC SQL] SET [NO]CACHE_DYNAMIC
[EXEC SQL] SET [NO]CARDINALITY_CHECK
[EXEC SQL] SET CONNECTION NONE | connection_name
[EXEC SQL] SET CPUFACTOR [value]
[EXEC SQL] SET DATE_ALIAS [INGRESDATE | ANSIDATE]
[EXEC SQL] SET DATE_FORMAT [value]
[EXEC SQL] SET DECIMAL [value]
[EXEC SQL] SET [NO]FIRSTVAL
[EXEC SQL] SET [NO]FLATTEN
[EXEC SQL] SET [NO]HASH
[EXEC SQL] SET [NO]HASHAGG
[EXEC SQL] SET [NO]HASHJOIN
[EXEC SQL] SET [NO]IO_TRACE
[EXEC SQL] SET JOINOP NOTIMEOUT | TIMEOUT | TIMEOUT nnn
[EXEC SQL] SET JOINOP TIMEOUTABORT nnn
[EXEC SQL] SET JOINOP [NO]GREEDY
[EXEC SQL] SET NOJOURNALING | JOURNALING [ON table_name]
[EXEC SQL] SET LOCKMODE SESSION|ON table_name WHERE
              [LEVEL = PAGE | TABLE | SESSION | SYSTEM | ROW | MVCC]
              [, READLOCK = NOLOCK |SHARED | EXCLUSIVE
                              | SESSION | SYSTEM]
              [, MAXLOCKS = n | SESSION | SYSTEM]
              [, TIMEOUT = n | SESSION | SYSTEM | NOWAIT]
[EXEC SQL] SET [NO]LOCK_TRACE
[EXEC SQL] SET [NO]LOGDBEVENTS
[EXEC SQL] SET [NO]LOGGING
[EXEC SQL] SET [NO]LOG_TRACE
[EXEC SQL] SET NOMAXCONNECT | MAXCONNECT value
[EXEC SQL] SET NOMAXCOST | MAXCOST value
[EXEC SQL] SET NOMAXCPU | MAXCPU value
[EXEC SQL] SET NOMAXIDLE | MAXIDLE value
[EXEC SQL] SET NOMAXIO | MAXIO value
[EXEC SQL] SET NOMAXPAGE | MAXPAGE value
[EXEC SQL] SET NOMAXQUERY | MAXQUERY value
[EXEC SQL] SET NOMAXROW | MAXROW value
[EXEC SQL] SET MONEY_FORMAT [value]
[EXEC SQL] SET MONEY_PREC [value]
[EXED SQL] SET NUMERIC_OVERFLOW WARN | FAIL | IGNORE
[EXEC SQL] SET [NO]OJFLATTEN
[EXEC SQL] SET [NO]OPTIMIZEONLY
[EXEC SQL] SET [NO]PARALLEL [degree of parallelism]
[EXEC SQL] SET [NO]PRINTDBEVENTS
[EXEC SQL] SET [NO]PRINTQRY
[EXEC SQL] SET [NO]PRINTRULES
[EXEC SQL] SET [NO]QEP [CONCISE]
[EXEC SQL] SET RANDOM_SEED [value]
[EXEC SQL] SET RESULT_STRUCTURE
                HEAP | CHEAP | HEAPSORT | CHEAPSORT | HASH | CHASH
               | ISAM |CISAM | BTREE | CBTREE
[EXEC SQL] SET ROLE NONE | rolename [WITH PASSWORD = 'pwd'];
[EXEC SQL] SET [NO]RULES
[EXEC SQL] SET SESSION
                [ADD PRIVILEGES ( priv {,priv} )
                |DROP PRIVILEGES ( priv {,priv}) ]
                [WITH
                      ON_ERROR = ROLLBACK STATEMENT | TRANSACTION
                      ON_USER_ERROR = ROLLBACK TRANSACTION | NOROLLBACK
                      | DESCRIPTION ='session_description'
                      | NODESCRIPTION
                      | PRIORITY = INITIAL | MINIMUM | MAXIMUM | priority
                      | PRIVILEGES = ( priv {, priv}) |ALL | DEFAULT
                      | NOPRIVILEGES
                       ON_LOGFULL = COMMIT | ABORT | NOTIFY]
[EXEC SQL] SET SESSION READ ONLY | READ WRITE
              [, ISOLATION LEVEL SERIALIZABLE | REPEATABLE READ |
                   READ COMMITTED | READ UNCOMMITTED ]
[EXEC SQL] SET SESSION AUTHORIZATION username | USER | CURRENT_USER
                   SESSION_USER | SYSTEM_USER | INITIAL_USER
[EXEC SQL] SET SESSION [NO]CACHE_DYNAMIC
[EXEC SQL] SET SESSION COLLATION collation_name
[EXEC SQL] SET [NO]STATISTICS tablename
[EXEC SQL] SET NOTRACE OUTPUT | TRACE OUTPUT filename
[EXEC SQL] SET [NO]TRACE POINT [value]
[EXEC SQL] SET TRANSACTION READ ONLY | READ WRITE
              [, ISOLATION LEVEL SERIALIZABLE | REPEATABLE READ |
               READ COMMITTED | READ UNCOMMITTED ]
[EXEC SQL] SET NOUNICODE_SUBSTITUTION | UNICODE_SUBSTITUTION [substitution character]
[EXEC SQL] SET UPDATE_ROWCOUNT CHANGED | QUALIFIED
[EXEC SQL] SET WORK LOCATIONS ADD | DROP | USE
              location {, location}