|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to find current databaseIs there a way to find out what is the current database?
In Query analizer, you execute "use <db-name>", and you can se the current database in the combo box. Is the an SQL command to find currrent database ? Boaz Ben-Porat Milestone Systems See function DN_NAME in BOL.
Example: select db_name() go DB_NAME http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_706d.asp AMB Show quote "Boaz Ben-Porat" wrote: > Is there a way to find out what is the current database? > > In Query analizer, you execute "use <db-name>", and you can se the current > database in the combo box. Is the an SQL command to find currrent database ? > > Boaz Ben-Porat > Milestone Systems > > > Correction:
See function DB_NAME in BOL. AMB Show quote "Alejandro Mesa" wrote: > See function DN_NAME in BOL. > > Example: > > select db_name() > go > > DB_NAME > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_706d.asp > > > AMB > > "Boaz Ben-Porat" wrote: > > > Is there a way to find out what is the current database? > > > > In Query analizer, you execute "use <db-name>", and you can se the current > > database in the combo box. Is the an SQL command to find currrent database ? > > > > Boaz Ben-Porat > > Milestone Systems > > > > > > SELECT DB_NAME()
Show quote "Boaz Ben-Porat" <b**@milestone.dk> wrote in message news:%23UYynvt5FHA.1000@tk2msftngp13.phx.gbl... > Is there a way to find out what is the current database? > > In Query analizer, you execute "use <db-name>", and you can se the current > database in the combo box. Is the an SQL command to find currrent database > ? > > Boaz Ben-Porat > Milestone Systems > > |
|||||||||||||||||||||||