pro_registclientandretrunid.sql
来自「一套宾馆管理系统」· SQL 代码 · 共 19 行
SQL
19 行
create procedure RegistClientAndReturnID
@Stamt varchar(1000),
@Return_id numeric(38) output
as
declare @LestSmt varchar(350)
set @LestSmt='insert into CustomerList(custom_name,custom_sexid,custom_countryid,
custom_nation,custom_birth,custom_phone,custom_post,custom_address,
custom_idno,image_path,regist_date,leave_date,live_day,room_id,
bed_no,bedsta_id,memo1)'
execute (@LestSmt+' '+@Stamt)
-- select @Client_Name,SexList.Sex_id,CountryList.Country_id,@Client_Nation,
-- @Client_Birth,@Client_Phone,@Client_Post,@Client_Address,@Client_IDNo,
-- @Image_Path,getdate(),getdate()+@Live_Day,@Live_Day,@Room_ID,@Bed_NO,
-- @Bedsta_ID,@Memo
-- from SexList, CountryList where Sex_name=@Client_Sex
-- and CountryList.Country_name=@Client_Country
set @Return_id=@@identity
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?