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
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:
Post a Comment