Viewing 2 posts - 1 through 2 (of 2 total)
Instead of escaping the single tick, I find it more straight forward to use QUOTENAME:
SELECT @Result = 'Total of ' + QUOTENAME(CAST(@NoOfColumns AS VARCHAR), CHAR(39)) + ' column(s)';
February 12, 2018 at 3:20 am
#1979397
I am not sure why are you dropping and recreating the Foreign Keys? Why not just disable and re-eanble them?
If the table has an Identity column, you cannot Truncate...
December 1, 2016 at 5:06 am
#1915360