|
|
Firebird makes available a number of system-maintained variable values in the context of the current client connection and its activity. These context variables are available for use in SQL, including the trigger and stored procedure language, PSQL. Some are available only in PSQL and most are available only in dialect 3 databases. Table outlines Firebird’s context variables.
List of Context Variables
Points to Note
Remember that these are transient values.
Examples Using Context Variables
This statement returns the server time at the moment the server serves the request of the Firebird client:
SELECT CURRENT_TIME AS TIME_FINISHED FROM RDB$DATABASE;In this insert statement, the current transaction ID, the current server timestamp, and the system user name will be written to a table:
INSERT INTO TRANSACTIONLOG (TRANS_ID, USERNAME, DATESTAMP) VALUES ( CURRENT_TRANSACTION, CURRENT_USER, CURRENT_TIMESTAMP);
|
|
Firebird Related Tutorials |
|
---|---|
MySQL Tutorial | Linux Tutorial |
Windows 10 Tutorial | Windows 10 Development Tutorial |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.