sql declare temporary table code example
Example 1: create temporary table sql
-- CREATE TEMP TABLE
Create Table #MyTempTable (
EmployeeID int
);
-- DROP TEMP TABLE
IF OBJECT_ID('tempdb..#MyTempTable') IS NOT NULL DROP TABLE #MyTempTable
Example 2: create temp table in sql
-- CREATE TEMP TABLE
Create Table #MyTempTable (
EmployeeID int
);