Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2005 Get tables names of a DB

Status
Not open for further replies.

Albano

Instructor
Dec 11, 2000
221
PT
Hi,

Whow can I get table names of a expecific Data Base?

Thanks,

Albano
 
run this in the DB that you want the tables for

select table_schema,table_name from information_schema.tables
where table_type ='BASE TABLE'
order by table_schema,table_name

Denis The SQL Menace
SQL blog:
 
but, this don´t give-me the list of table names of a custum DB (eg:One made by me)
 
why not?

have you run this in your db?

use yourdb
go


select table_schema,table_name from information_schema.tables
where table_type ='BASE TABLE'
order by table_schema,table_name


Denis The SQL Menace
SQL blog:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top