表的名字叫 TblCharinfoTimeLog
人物的名字叫123,求大神帮忙弄个人物123累计在线的语句!!
我写这个语句!! 可是查询了123的信息还是 usetime=2 在线时间2分钟
在线时间累积语句
declare @usetime int
select @usetime=datediff(mm,lastlogin,lastlogout)
from charinfo_time
where charid = @charid
update tblcharinfotimelog
set usetime=usetime+@usetime
where charid = @charid
这几个命令怎么写? usetime累加