2
如何在Microsoft SQL Server 2008中編寫以下內容?upsert with addition
IF EXISTS(SELECT * FROM Table WHERE Something=1000)
UPDATE Table SET Qty = Qty + 1 WHERE Something=1000
ELSE
INSERT INTO Table(Something,Qty) VALUES(1000,1)
我喜歡你的第二個解決方案。很緊。我甚至開始和結束。 – 2010-05-26 21:00:40