Returns the database ID number.
DB_ID( [ database-name ] )
database-name A string containing the database name. If no database-name is supplied, the ID number of the current database is returned.
INT
SQL/2003 Vendor extension.
The statement returns the value 0, when executed against the SQL Anywhere sample database as the sole database on the server.
SELECT DB_ID( 'demo' ); |
The following statement returns the value 0 if executed against the only running database.
SELECT DB_ID( ); |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |