Assignment8-fall2007ans

Assignment8-fall2007ans - Capitol College CS220 - Database...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS220 - Database Management Assignment # 8 SQL Assignment # 4 1.Write a query to display the name, department number, and department name for all employees. Select e.ename, e.deptno, d.dname from emp e, dept d Where e.deptno = d.deptno; 2. Create a unique listing of all jobs that are in department 30. Select distinct e.job, d.loc from emp e, dept d Where e.deptno = d.deptno And e.deptno = 30; 3. Write a query to display the employee name, department name and location of all employees who earn a commission. Select e.ename , d.dname, d.loc from emp e, dept d Where e.deptno = d.deptno And e.comm is not null; 4. Display the employee name and department name for all employees who have an A in their name. Save you sql statement in a file called p4q4.sql; Select e.ename, d.dname from emp e, dept d Where e.deptno = d.deptno And e.ename like ‘%A%’; 5. Write a query to display the name, job, department number, department name for all employees who work in DALLAS. Select e.ename, e.job, e.deptno, d.dname from emp e, dept d
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2012 for the course COMPUTER CS 220 taught by Professor Idk during the Fall '07 term at Capitol College.

Page1 / 3

Assignment8-fall2007ans - Capitol College CS220 - Database...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online