Get DB tables list and Cols list

  • Thread starter Thread starter Wardeaux
  • Start date Start date
W

Wardeaux

All,
What's fastest/easiest way to get a list of tables within a DB and a list
of cols within DB. I want to check and update my DB structure at runtime...
prefer without SQL-DMO...
MTIA
wardeaux
 
Wardeaux said:
All,
What's fastest/easiest way to get a list of tables within a DB and
a list of cols within DB. I want to check and update my DB structure
at runtime... prefer without SQL-DMO...

You can always query the SQL Server's master tables - assuming you
have the correct permissions...

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com
 
What's fastest/easiest way to get a list of tables within a DB

SELECT * FROM INFORMATION_SCHEMA.TABLES
and a list of cols within DB.

SELECT * FROM INFORMATION_SCHEMA.COLUMNS


Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top