SQL Interview Questions part 11

You can see part 10 here.

151) My boss has changed his mind.  Now he doesn’t want to pay more than 10,000.so revoke that salary constraint.

152) Add column called as mgr to your emp table;

153) Oh! This column should be related to empno.  Give a command to add this constraint.

154) Add deptno column to your emp table;

155) This deptno column should be related to deptno column of dept table.

 156) Give the command to add the constraint.

 157) Create table called as newemp.  Using single command create this table as well as get data into this table(use create table as).

158) Create table called as newemp.  This table should contain only empno,ename,dname.

159) Delete the rows of employees who are working in the company for more than 2 years.

160) If any employee has commission his commission should be incremented by 10% of his salary.

161) Display employee name and department name for each employee.

 162)Display employee number,name and location of the department in which he is working.

163) Display ename,dname even if there are no employees working in a particular department(use outer join).

164) Display employee name and his manager name.

165) Display the department name and total number of employees in each department.


 

Questions/Suggestions
Have any question or suggestion for us?Please feel free to post in Q&A Forum
SQL Interview Questions part 10
SQL Interview Questions part 12
Shekhar Sharma

Shekhar Sharma

Shekhar Sharma is founder of testingpool.com. This website is his window to the world. He believes that ,"Knowledge increases by sharing but not by saving".

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *