Write a stored procedure for emplpoyee and department table
to get DeptName which having no employee.
Table Structure-
Emp-Emp_Id,Emp_Name,Dept_id
Dept-Dept_Id,Dept_Name

Answer Posted / sivaram pothuru

select a.*,d.* from dept a
left join emp d on a.deptno=d.deptno where d.deptno is null

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the different topologies in which replication can be configured?

632


How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?

703


What is indexing in sql server with example?

589


What are SSL and TSL protocols?

670


What is user defined stored procedures?

646






What is subquery explain with example?

706


Explain the difference between function and stored procedure?

600


How you provide security to cube? : sql server analysis services, ssas

636


What is temporary stored procedure?

621


How to create a ddl trigger using "create trigger" statements?

709


How can you list all the table constraints in a database?

603


How does a profiler work?

608


How can you insert null values in a column while inserting the data?

811


Is there any difference between the primary key and unique key?

668


How to resolve the orphan use problem? : sql server security

615