CREATE procedure [dbo].[up_save_logout] @auth_id uniqueidentifier as begin set nocount on declare @last_time datetime select @last_time = BTime from AuthTable where AuthID = @auth_id update AuthTable set world_id=0, [online] = '0', [BTime] = GETDATE(), [LTime] = @last_time from AuthTable where AuthID = @auth_id end return @@error