Skip to main content

Context Functions

FunctionDescriptionExampleResult
CONNECTION_ID()Return the connection id for the connection.CONNECTION_ID()9b16ca73-e393-43bb-a77b-fa546e1b7b69
CURRENT_USER()Returns the user name and host name combination for the account that the server used to authenticate the current client. This account determines your access privileges. The return value is a string in the utf8 character set.CURRENT_USER()'root'@'127.0.0.1'
DATABASE()Returns the name of the currently selected database. If no database is selected, then this function returns default.DATABASE()default
VERSION()Return the current version information of DatabendQuery.VERSION()DatabendQuery v-0.1.0-0f9ec31-simd(1.56.0-nightly-2021-08-10T15:25:36.875868571+00:00)