-- CREATE TEMP TABLE
Create Table #MyTempTable (
EmployeeID int
);
-- CREATE TEMP TABLE
Create Table #MyTempTable (
EmployeeID int
);
-- DROP TEMP TABLE
IF OBJECT_ID('tempdb..#MyTempTable') IS NOT NULL DROP TABLE #MyTempTable
IF Object_ID('tempdb..#Tablename') IS NOT NULL DROP TABLE #Tablename
Select
*
into
#Tablename
FROM
SampleTable
If(OBJECT_ID('tempdb..#temp') Is Not Null)
Begin
Drop Table #Temp
End
declare @table table (id int)
create table #table (id int)
create table ##table (id int)
select * into #table from xyz
declare table sql server