Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - SQL Reference » Using SQL » SQL statements » SQL statements (E-O)


GET OPTION statement [ESQL]

You can use this statement to get the current setting of an option. It is recommended that you use the CONNECTION_PROPERTY function instead.

GET OPTION [ userid.]option-name
{ INTO hostvar | USING DESCRIPTOR sqlda-name }
userid : identifier, string, or hostvar
option-name :  identifier, string, or hostvar
hostvar : indicator variable allowed
sqlda-name : identifier

The GET OPTION statement is provided for compatibility with older versions of the software. The recommended way to get the values of options is to use the CONNECTION_PROPERTY system function.

The GET OPTION statement gets the option setting of the option option-name for the user userid or for the connected user if userid is not specified. This is either the user's personal setting or the PUBLIC setting if there is no setting for the connected user. If the option specified is a database option and the user has a temporary setting for that option, then the temporary setting is retrieved.

If option-name does not exist, GET OPTION returns the warning SQLE_NOTFOUND.


None required.

Side effects


See also
Standards and compatibility
  • SQL/2003   Vendor extension.


The following statement illustrates use of GET OPTION.

EXEC SQL GET OPTION 'date_format' INTO :datefmt;