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.
Author |
Topic |
sfjtraps
Yak Posting Veteran
65 Posts |
Posted - 2014-03-05 : 18:00:36
|
I'm running SQL Server 2012 Express. I need to query a database and return the list of tables in the database. Can someone please help me construct this query?Thank you,sfjtraps |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2014-03-05 : 18:33:12
|
http://stackoverflow.com/questions/175415/how-do-i-get-list-of-all-tables-in-a-database-using-tsql |
|
|
sfjtraps
Yak Posting Veteran
65 Posts |
Posted - 2014-03-05 : 18:54:55
|
Got it......answer is:SELECT * FROM information_schema.tables |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2014-03-06 : 06:39:05
|
Another methodEXEC sp_tablesMadhivananFailing to plan is Planning to fail |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2014-03-06 : 07:08:18
|
how about select name from sys.tables where type = 'U' How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
|
|
|
|
|