SQL存储过程 急~~~~~~~~!! 给分
求帮助set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[adduser]
@name varchar(64),
@passwd binary(16),
@prompt varchar(32),
@answer varchar(32),
@truename varchar(32),
@idnumber varchar(32),
@email varchar(64),
@mobilenumber varchar(32),
@province varchar(32),
@city varchar(32),
@phonenumber varchar(32),
@address varchar(64),
@postalcode varchar(8) ,
@gender integer,
@birthday varchar(32),
@qq varchar(32),
@passwd2 binary(16)
AS
SET ANSI_NULLS ON
SET ANSI_WARNINGS ON
SET ANSI_NULL_DFLT_ON ON
SET QUOTED_IDENTIFIER ON
SET NOCOUNT ON
SET XACT_ABORT ON
BEGIN TRAN
DECLARE @id integer
SELECT @id = ISNULL(max(id), 16) + 16 FROM users HOLDLOCK
INSERT INTO users (id,name,passwd,prompt,answer,truename,idnumber,email,mobilenumber,province,city,phonenumber,address,postalcode,gender,birthday,creatime,qq,passwd2) VALUES( @id, @name, @passwd, @prompt, @answer, @truename, @idnumber, @email, @mobilenumber, @province, @city, @phonenumber, @address, @postalcode, @gender, @birthday, getdate(), @qq, @passwd2 )
COMMIT TRAN
这是存储过程!
exec adduser 'admin','fedr543hyd6124fc','1','1','1','2','1','1','1','1','1','1','1','1','2010-01-10','123','fedr543hyd6124fc'
我存储时叫我用convert转换
exec adduser 'admin',convert(binary,'fedr543hyd6124fc'),'1','1','1','2','1','1','1','1','1','1','1','1','2010-01-10','123',convert(binary,'fedr543hyd6124fc')
但是我转换后 又提式我convert语法有错误!
给分50 谢谢们 请大家帮帮忙....