Get all the tables in the database
-
Is there a sql query which will help me get the names of all the tables in the database.
-
Is there a sql query which will help me get the names of all the tables in the database.
SELECT * FROM INFORMATION_SCHEMA.TABLES
Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
-
Is there a sql query which will help me get the names of all the tables in the database.
If you are doing it from code you could use the GetSchema("Databases") command off of the sqlconnection.
_____________________________________________________________________ Our developers never release code. Rather, it tends to escape, pillaging the countryside all around. The Enlightenment Project (paraphrased comment) Visit Me at GISDevCafe
-
Is there a sql query which will help me get the names of all the tables in the database.
Hi.. Try the following query.. select * from sysobjects where xtype='u'
Balaguru
-
Hi.. Try the following query.. select * from sysobjects where xtype='u'
Balaguru
Nothing is working. My db name is siebeldb and presently there is only 1 table in it, namely 'orders'. But knowing that siebeldb is the database, how do I get the names of the tables it contains. Also when I know a table, how do I get the fieldnames and fieldtypes in the table.