How to check whether record is present or not in a table?

 Posted by Rajesh_Kumar on 1/20/2014 | Category: Sql Server Interview questions | Views: 875 | Points: 40
Answer:

With the help of Exists in-built sql server function,we can check where record is present in a Table or Not.It returns true if record is present otherwise returns false.

For Example:-
if exists(select project_name from project_master where upper(project_name) = upper('Hospital Management'))

begin
print 'True - Present';
end
else
print 'False - Not Present';


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response