Hi friends,
How I can get list of tables and list of fields within those tables in SQL server.
Thnak a lot.
Check the thisarticlefrom 4guyfromrolla website
Regards
|||Rather than select data out of the sysobjects table, which is notguaranteed to be forwards/backwards compatible with different SQLServer versions, I encourage you to use the INFORMATION_SCHEMAviews which are supposed to work with each SQL Serverversion. In particular, look into the TABLES and/or COLUMNS views.|||
tmorton wrote:
I encourage you to use the INFORMATION_SCHEMA
views which are supposed to work with each SQL Server
version.
Actually, I think you are supposed to use the system stored procedures. For instance, to list all tables in databse execsp_tables etc.|||
Thanksa lot for your kind and useful info.
No comments:
Post a Comment