How to get list of tables in SQL Server
-
Hi Everyone, How to get the list of table name and tables related to them, in SQL Server Database??? Thanks in advance........... -Prashant :rose:
-
Hi Everyone, How to get the list of table name and tables related to them, in SQL Server Database??? Thanks in advance........... -Prashant :rose:
select * from sysobjects select * from syscolumns
Thanks Warm Regards Prakash-B
-
Hi Everyone, How to get the list of table name and tables related to them, in SQL Server Database??? Thanks in advance........... -Prashant :rose:
-
SYSOBJECTS table contains all objects created in a databse SELECT * FROM sysobjects WHERE xtype = 'U' AND uid = user_id() this returns all tables created in the current database by the current user.
Regards KP
-
good answer. more details http://msdn2.microsoft.com/en-us/library/ms177596.aspx
-
Hi Everyone, How to get the list of table name and tables related to them, in SQL Server Database??? Thanks in advance........... -Prashant :rose:
You should also look at getschema("Tables"). This is an Ado method introduced in 2.0 to eliminate the need to query the system tables.
_____________________________________________________________________ Our developers never release code. Rather, it tends to escape, pillaging the countryside all around. The Enlightenment Project (paraphrased comment) Visit Me at GISDevCafe