Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Find the database which have specify table name
declare @tablename varchar(100)='spt_values' declare @sql varchar(max) set @sql=' if object_id(''?..'+@tablename+''') IS NOT NULL select ''table '+@tablename+' existed in ''+ ''?''' EXEC sys.sp_MSforeachdb @sql
run
|
edit
|
history
|
help
0
Pivot and Unpivot
Fff
Dynamic substring in SQL
P1
megha
libros
Crea, inserta y confirma tabla
Movies
megha
SQL