CREATE PROCEDURE finduser @username char(30)
AS
select * from userinfo where username=@username
update userinfo set u_look_num=u_look_num+1 where username=@username
GO
AS
select * from userinfo where username=@username
update userinfo set u_look_num=u_look_num+1 where username=@username
GO
本文介绍了一个SQL存储过程,该过程通过输入用户名参数来查询userinfo表中所有字段,并更新用户的查看次数。此方法适用于需要频繁进行用户信息查询并记录访问情况的应用场景。
1099

被折叠的 条评论
为什么被折叠?



