use 指定数据库;
select sysobjects.name as tablename,syscolumns.name as columnname from syscolumns join sysobjects on sysobjects.id = syscolumns.id where syscolumns.name like '%此处为列名%' 获得全部列名 use xxDB;select sysobjects.name as tablename,syscolumns.name as columnname from syscolumns join sysobjects on sysobjects.id = syscolumns.id