Discussion Locked

SQL Command for list table

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to be able to list all the table that exist on my database. Is there a command that I can use that will list all the table on that database.

1 reply

by joseph moore

It depends on which sql server you are using.

Here is the answer if you use Microsoft SQL Server. Open Query Analyzier, and choose the database you want to know the tables.

Run the following code:

select * from sysobjects
where xtype = 'U'
order by name

That will list all User tables (all tables made in your database, excluding the system tables).

hope this helps

This discussion is closed to new replies.