Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: A Simple Introduction to Dynamic SQL

    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)';

  • RE: Truncate tables with foreign keys

    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...

Viewing 2 posts - 1 through 2 (of 2 total)