两个重要SQL语句

1.查询表的所有列

select name from syscolumns

where syscolumns.id =(select id from sysobjects where sysobjects.name='Exhibition')

2.查询数据库中所有表

select name from [sysobjects] where xtype='U'

(注:针对SQL SERVER 2000)

你可能感兴趣的:(sql语句)