February 11, 2002 at 12:54 pm
Is there an sql command or executable that will show all table names for a specific database? (From a command line?) Thanks
February 11, 2002 at 12:56 pm
You can use sp_tables in Query Analyzer. If you need it from a true command line you can use OSQL to run it.
Andy
February 11, 2002 at 2:02 pm
Hmmm What is the command to show all tables? It doesn't seem to like anything I throw at it. 🙂
February 11, 2002 at 2:02 pm
Hmmm What is the command to show all tables? It doesn't seem to like anything I throw at it. 🙂
February 11, 2002 at 5:18 pm
What have you done so far and what are you trying to actually do?
February 12, 2002 at 7:02 am
It's ok I figured it out. sp_tables (just so you don't think I should of known that, I'm not a dba hehe)
February 12, 2002 at 10:11 am
You can also query information_schema.tables.
Ref:http://www.sqlservercentral.com/columnists/rsharma/informationschema.asp
Steve Jones
February 18, 2002 at 2:45 pm
select name from sysobjects where type ='U'
February 18, 2002 at 3:05 pm
You should avoid the sysobjects and other similar tables as they may change in future releases and for the moment Microsoft is saying you the SPs or Schema views as they plan to keep these with same output so developeres can spend less trouble on reprogramming for table changes.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply