select * from sysobjects where xtype='U'; --当前所有的数据表
select * from sysobjects where name like '%MealOrder%' and xtype='U' --模糊查询表名
SELECT * FROM information_schema.columns WHERE column_name LIKE '%subcompanyid%' and table_name in (SELECT table_name FROM information_schema.columns WHERE column_name LIKE '%userno%') --模糊查询多表相同字段
注意:本文归作者所有,未经作者允许,不得转载