Here condition is true then it return true otherwise return false
ALTER PROCEDURE spAppliedJobOrnot
--Here job is already applied then it return true otherwise return false
@check bit OUTPUT,
@UserId numeric,
@JobId numeric
AS
BEGIN
SET NOCOUNT ON;
if exists (SELECT 1 FROM StudentInbox_Activities WHERE JobId=@JobId and StudentId=@UserId and
JobAppliedDate is not null)
BEGIN
SET @check=1 --The job is applied so check=true
END
ELSE
BEGIN
SET @check=0;
END
END
GO
Here how to get the @check value