0
我有一個產品表。我有一些空行。我想用現有的行填充這些行。例如,如果我有如何使用現有行更新行?
Product
-----------------------------------
ID Name Desc ---------------
1 A A1 ---------------
2 B B1 ---------------
3 C C1 ---------------
我想將ID = 1的所有項複製到ID = 3行。
試過,但收到錯誤,Ambigious
UPDATE [Products]
SET DP.[Name] = SP.Name
,DP.[Desc] = SP.DESC
FROM [Products] DP
INNER JOIN [Products] SP ON SP.ID = 3
WHERE DP.ID = 1
[你有什麼** **你試過??](http://www.whathaveyoutried.com) – 2013-04-04 07:57:53
複製 - http://stackoverflow.com/questions/2334712/update-from-select- using-sql-server – 2013-04-04 07:58:41
@感謝Deepak。我已seearched,但沒有發現任何 – user960567 2013-04-04 08:03:19