Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to see the database and tables in osql

Author  Topic 

tanveer45
Starting Member

6 Posts

Posted - 2004-11-18 : 08:33:30
Hi all,

I am new to sql server and wants to know in OSQL what is the command to see the databases?
Using Enterprise manager I can see how many databases are there and which tables are in each database? But in OSQL prompt how to do that?
For example:
In MySQL the cmd for this is: show databases
To select a database cmd is : use database_name
To see which tables are in current database: show tables
HOw to do that in SQL server? Hope I made myself clear





Joy of life is to make impossbile to possible

chadmat
The Chadinator

1974 Posts

Posted - 2004-11-18 : 13:12:39
select * from sysdatabases
select * from INFORMATION_SCHEMA.TABLES

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

tanveer45
Starting Member

6 Posts

Posted - 2004-11-19 : 12:37:33
THANKZ A LOT.

Joy of life is to make impossbile to possible
Go to Top of Page
   

- Advertisement -