How to check no-match situation in SQL(編號:4486)

As title, if i want to show the error message if record exist after executing the SQL statement. How can I do?