sql server全库字段查询

有时忘记某个字段在数据库中的哪个表里了,可以利用syscolumns来进行查找。 select object_name(id) objName,Name as colName from syscolumns where (name like'%模糊被查找字段%') and id in(select id from sysobjects where xtype='u') order by objname;

August 13, 2024 · Leon