Popular Posts

SQLblog.com - The SQL Server blog spot on the web

Sunday, July 16, 2017

If exists table dynamic sql from variable database id

SQLServerCentral » Latest topics
If exists table dynamic sql from variable database id
Hi 

I want to write if the table exists in the database in dynamic sql then select from that table .

I have written this but i want to use in if then

DECLARE @SQL NVARCHAR(MAX);
set @SQl = 'SELECT * FROM ['+ @DBID+'].s

No comments: