数据库篇之存储过程[bsp_createorder](非官方版本)

来源:互联网 发布:电脑语音同声翻译软件 编辑:程序博客网 时间:2024/06/18 17:25

差异如图:

更新语句如下:

DROP PROCEDURE [bsp_createorder]GOSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE 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)ASBEGINSET 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';ENDGO


0 0