差异如图:
更新语句如下:
DROP PROCEDURE [bsp_createorder]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [bsp_createorder]
@osn char(30)
,@uid int
,@orderstate tinyint
,@productamount decimal(18,2)
,@orderamount decimal(18,2)
,@surplusmoney decimal(18,2)
,@parentid int
,@isreview tinyint
,@addtime datetime
,@shipsn char(30)
,@shipsystemname char(20)
,@shipfriendname nchar(30)
,@shiptime datetime
,@paysn char(30)
,@paysystemname char(20)
,@payfriendname nchar(30)
,@paymode tinyint
,@paytime datetime
,@regionid smallint
,@consignee nvarchar(20)
,@mobile varchar(15)
,@phone varchar(12)
,@email varchar(50)
,@zipcode char(6)
,@address nvarchar(150)
,@besttime datetime
,@shipfee decimal(18,2)
,@payfee decimal(18,2)
,@fullcut int
,@discount decimal(18,2)
,@paycreditcount int
,@paycreditmoney decimal(18,2)
,@couponmoney int
,@weight int
,@buyerremark nvarchar(250)
,@ip varchar(15)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @oid int;
INSERT INTO [bsp_orders]
([osn]
,[uid]
,[orderstate]
,[productamount]
,[orderamount]
,[surplusmoney]
,[parentid]
,[isreview]
,[addtime]
,[shipsn]
,[shipsystemname]
,[shipfriendname]
,[shiptime]
,[paysn]
,[paysystemname]
,[payfriendname]
,[paymode]
,[paytime]
,[regionid]
,[consignee]
,[mobile]
,[phone]
,[email]
,[zipcode]
,[address]
,[besttime]
,[shipfee]
,[payfee]
,[fullcut]
,[discount]
,[paycreditcount]
,[paycreditmoney]
,[couponmoney]
,[weight]
,[buyerremark]
,[ip])
VALUES
(@osn
,@uid
,@orderstate
,@productamount
,@orderamount
,@surplusmoney
,@parentid
,@isreview
,@addtime
,@shipsn
,@shipsystemname
,@shipfriendname
,@shiptime
,@paysn
,@paysystemname
,@payfriendname
,@paymode
,@paytime
,@regionid
,@consignee
,@mobile
,@phone
,@email
,@zipcode
,@address
,@besttime
,@shipfee
,@payfee
,@fullcut
,@discount
,@paycreditcount
,@paycreditmoney
,@couponmoney
,@weight
,@buyerremark
,@ip)
SET @oid=SCOPE_IDENTITY();
SELECT @oid AS 'oid';
END
GO