mssql查询表在哪个数据库中

mssql查询表在哪个数据库中

EXEC sp_MSforeachdb @command1='IF object_id(''?'' + ''..表名'') IS NOT NULL PRINT ''?'''

原文地址:https://www.cnblogs.com/SoftWareIe/p/6291694.html