0

Hi
can anyone help me on how to get the names of the tables from a DB - MSSQL 2k server? i need to list them or add them into a combobox, but i also need to select them by owner, or by type. user defned or system.
thx in advance

2
Contributors
2
Replies
5
Views
11 Years
Discussion Span
Last Post by Seba Sama
0

Use INFORMATION_SCHEMA. Example:

SELECT TABLE_SCHEMA,TABLE_NAME, OBJECTPROPERTY(object_id(TABLE_NAME), N'IsUserTable') AS type 
 FROM INFORMATION_SCHEMA.TABLES

There are many others, search the index in Books On-lline (the manual you get with SQl Server) for all the others or search the SQLTeam.com forums where there are many posts and articles on getting metadata from MS SQL Server.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.