How to return a boolean value on SQL Select Statement?
I tried this code:
SELECT CAST(1 AS BIT) AS Expr1 FROM [User] WHERE (UserID = 20070022)
Use 'Exists' which returns either 0 or 1.
The query will be like:
SELECT EXISTS(SELECT * FROM USER WHERE UserID = 20070022)