check if a name exist in database ?

Jak
Jak
Member
858 Points
132 Posts

How do we check if a name exist in database ?

Views: 9788
Total Answered: 1
Total Marked As Answer: 0
Posted On: 21-Mar-2015 19:19

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Teacher
4822 Points
23 Posts
         

we can do that in one sql statement:

if exists (select * from yourTable where yourField=YourValue) begin select 'Found this user' end else begin select 'Cannot find user' end
Posted On: 21-Mar-2015 19:21
 Log In to Chat