0
Q:

if exists sql server

IF EXISTS (SELECT * FROM tblGLUserAccess WHERE GLUserName ='xxxxxxxx') 
BEGIN
   SELECT 1 
END
ELSE
BEGIN
    SELECT 2
END
2
if exists(select 1 from table where id = 4)
1

New to Communities?

Join the community