SyntaxFix
Write A Post
Hire A Developer
Questions
There's no need for "else" in this case:
IF EXISTS(SELECT * FROM table1 WHERE Name='John' ) return 1 return 0