mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-17 09:25:32 +00:00
36 lines
603 B
Plaintext
36 lines
603 B
Plaintext
--Define a terminator character
|
|
--#SET TERMINATOR @
|
|
|
|
--List all databases (aliases)
|
|
LIST DB DIRECTORY
|
|
|
|
--Connect to a database (alias)
|
|
CONNECT TO mydb
|
|
|
|
--Disconnect from a database
|
|
CONNECT RESET
|
|
TERMINATE
|
|
|
|
--Get values from the environment (registry values)
|
|
-- Current timestamp
|
|
VALUES CURRENT TIMESTAMP
|
|
|
|
-- Connected user
|
|
VALUES CURRENT USER
|
|
|
|
-- Current database
|
|
VALUES CURRENT SERVER
|
|
|
|
--Change current schema
|
|
SET CURRENT SCHEMA otherschema
|
|
|
|
--Change the isolation level
|
|
SET ISOLATION RR
|
|
|
|
--Get help for a Db2 command
|
|
? command
|
|
|
|
--Get help for a SQL code (SQLXXXX) or SQLstate (YYYYY)
|
|
? SQLXXX
|
|
? YYYYY
|