declare @status int select @status = 0 select * from text_events where status = @status