I am currently doing a query such as
"SELECT * FROM MyTable WHERE SomeValue=0"
There are cases where this does not exist. Is there a method for determining if the select actually found the data without checking that each returned value is empty?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If there are no rows matching the criteria, then no result set or table would be returned. So, there is no need for this.
You can use the
IF EXISTS (Select Query)to see if there were any results matching the criteria and perform your subsequent operations.