I created one function to check whether the id exists or not. If it is exists then it returns 1 otherwise it returns 0 but i got an error like this
RETURN statements in scalar valued functions must include an argument.
My function is
create function [dbo].[CheckStudentId](@ID varchar(10))
returns varchar
as
begin
return
if exists (select id from Tablename where id=@ID)
print 1
else
print 0
end
Thanks in advance
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manesh GolekarPosted Aug 11, 2014, 3:09 AM