Wow, what a boring headline. But this is a quick tip. This is especially helpful when creating a DotNetNuke module and you want to run an Alter Table command on a table. You don’t want the install script to fail…
Tag: sql
SQL – Creating and Dropping Temp Tables
I run into this all the time but can’t ever remember the syntax. First, check to see if it exists and if it does, drop it. IF OBJECT_ID(‘tempdb..#MyTempTable’) IS NOT NULL Drop Table #MyTempTable Second, build your table. The “#”…