解决方法
粗糙而肮脏,但它会做这个工作.
-- Instructions. Replace "table_name_here" with actual table name sp_MSforeachdb 'USE ? IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N''[table_name_here]'') AND OBJECTPROPERTY(id,N''IsUserTable'') = 1) BEGIN PRINT ''Found in db ?'' END'