1到3是建立資料表 -> 新增一筆資料 ->查詢資料表

--1、新增暫存資料表
Create Table #TempTable(
id int,
px float,
py float
)

--2、新增一筆資料
INSERT INTO #TempTable (id, px, py )
 VALUES (2, 121.11, 25.1)

--3、查詢內容
select * from #TempTable

執行結果:


 

刪除資料表、確認已刪除該暫存資料表

--4、刪除暫存資料表
IF Object_id('tempdb..#TempTable') IS NOT NULL
BEGIN
      DROP TABLE #TempTable
END

--5、查詢內容
select * from #TempTable




執行結果:

arrow
arrow
    全站熱搜

    貓羽 發表在 痞客邦 留言(0) 人氣()