2011-12-07 62 views
0

我的查詢是:SP更新整個表

ALTER PROC [dbo].[AddUpdate] ---212,'pp','en-US' 
@MID int, 
@LPName nvarchar(250), 
@CCode nvarchar(50) 
AS 
BEGIN 
    IF(EXISTS(SELECT MID FROM [dbo].[MC] WHERE [email protected])) 
     BEGIN 
     UPDATE [dbo].[MC] 
     SET [email protected] 
      ,[email protected] 
     WHERE MID=MID 
     END 
    ELSE 
     BEGIN 
     Insert [dbo].[MC] 
     (MID,LPName,CCode) 
     values 
     (
     @MID,@LPName,@CCode) 
     END 
END 

但不是其被賦予了更新的更新特定的ID整體table.What是我mistake.Thanks。

回答