declare @UserID char(10)
select @UserID=UserID from tableif @UserID is null
begin
select * from tanle1
end
else
begin
select * from table2
end
select @UserID=UserID from tableif @UserID is null
begin
select * from tanle1
end
else
begin
select * from table2
end
select @UserID=UserID from tableif @UserID is NULL or @UserID =''
begin
select * from tanle1
end
else
begin
select * from table2
end