IF OBJECT_ID('tempdb..#Goods') IS NOT NULL
DROP TABLE #Goods
select * INTO #Goods from
(
select '1' cNo,'12000122' AS cGoodsNo, CAST(33.33 AS MONEY) AS fStock ,3.46 fPrice_In
union all
SELECT '2' cNo,'12000122' AS cGoodsNo, CAST(100 AS MONEY) AS fStock,3.46 fPrice_In
union all
select '3' cNo,'12000122' AS cGoodsNo, CAST(10 AS MONEY) AS fStock,3.46 fPrice_In
) a
IF OBJECT_ID('tempdb..#Find') IS NOT NULL
DROP TABLE #Find
select * into #Find FROM
(
SELECT '12000122' AS cGoodsNo, CAST(66.6 AS MONEY) AS fNeed
) A
能夠得到以下的查詢結果
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/269806.html
標籤:開發
上一篇:觸發器無法洗掉