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