CREATE procedure [fortview].usp_login
@用户名 varchar(20),
@密码 varchar(8),
as
Begin
declare @password varchar(8)
if not exists(select 1 from 用户表 where 用户名=@用户名)
Begin
select '不存在用户'
return
End
select @password=密码 from 用户表 where 用户名=@用户名
if @password<>@密码
begin
select '密码错误'
return
end
if not exists(select 1 from 用户组 where 用户名=@用户名)
Begin
select '用户没有分配到组'
return
End
CREATE PROCEDURE p_insert_gz_lishi
@gzItem_DM int ,
@qj int ,
@uid int,
@jinE money
AS
insert into GZ_LiShi(GzItem_DM,QJ,ShuRu_CZY,fuZhu,uid,jinE)
values( @gzItem_DM,@Qj,-100,'自动计算',@uid,@jinE)