查看所有表名:
select name from sysobjects where type='U'
查询表的所有字段名:
Select name from syscolumns Where ID=OBJECT_ID('表名')
根据字段,查字段所在的表,注意要大写
select * from INFORMATION_SCHEMA.COLUMNS where COLUMN_NAME = 'smpl_id'
select * from INFORMATION_SCHEMA.TABLES
select * from INFORMATION_SCHEMA.VIEWS
select * from INFORMATION_SCHEMA.COLUMNS