pro_registclient.sql
来自「一套宾馆管理系统」· SQL 代码 · 共 32 行
SQL
32 行
create procedure RegistClient
@Client_Name varchar(50),
@Client_Sex varchar(10),
@Client_Country varchar(50),
@Client_Nation varchar(50),
@Client_Birth varchar(10),
@Client_Phone varchar(20),
@Client_Post varchar(20),
@Client_Address varchar(50),
@Client_IDNo char(20),
@Image_Path varchar(50),
@Regist_Date varchar(10), --the client provide the string and the server convert to datetime
@Live_Day smallint,
@Leave_Date varchar(10),-- the client proveide the string and the server convert to datetime
@Room_ID int,
@Bed_NO int,
@Bedsta_ID smallint,
@Memo varchar(30),
@Return_id numeric(38) output
as
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)
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
select @Return_id=@@identity
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?