Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Check the database


Message #1 by "Alaa Salmo" <salmo@i...> on Mon, 4 Jun 2001 14:36:47
> Hi 
> I need your help !!!!
> I want to check in the database system , Do I have this name (database 
> name) in the system . Please can you send me the query, I think I have 
to 
> use "select" command.
> 
> Thank you
> 

Hi,

If you're trying to get the current database name you can do it like this:

  select db_name(Id)

where Id is the Id of a specific database. If you don't enter any Id, you 
will get the name of the current database.

/Henrik Pagander

  Return to Index