1CREATE TABLE #haro_products (
2 product_name VARCHAR(MAX),
3 list_price DEC(10,2)
4);
1-- CREATE TEMP TABLE
2Create Table #MyTempTable (
3 EmployeeID int
4);
5
6-- DROP TEMP TABLE
7IF OBJECT_ID('tempdb..#MyTempTable') IS NOT NULL DROP TABLE #MyTempTable
1DECLARE @TempTable AS TABLE(//Mention your columns in here.//)
2After that you can insert into this table later.
1SELECT *
2INTO #<Temp_Table_Name>
3FROM <TableName>
4WHERE <Conditions>
5ORDER BY <Col_Names OrderSeq>
6OPTION <Options>