1.all the table names in the database:
select name from sysobjects where type='U'
2.All the columns in a table
first step:
know the id of table name:
select id from sysobjects where name=tablename
second step
select name from syscolumns where id=table_id
-----Original Message-----
From: Harish Babu.N [mailto:harish_babu@c...]
Sent: Wednesday, November 01, 2000 11:19 PM
To: sql language
Subject: [sql_language] get table and column names
hi every body
I want to write sql script to get
1.All the table names in the database
2.All the columns in a table
Iam using Sql server.How do i do this?
Thanks in advance