Checking for employee's existence in a department

Bandi
Posted by Bandi under Sql Server category on | Points: 40 | Views : 284
IF( select count(*) from employees where DeptID= 100) > 0
PRINT ' there is employees in the department 100'
else
PRINT ' NO one is there in the department 100'


The above code snippet will check for whether the department 100 is having employees or not....

Comments or Responses

Login to post response