Assignment6-fall2006ans

Assignment6-fall2006ans - 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 # 6 SQL Assignment # 2 1. Create a query to display the name and salary of employees earning more than $2850. Save your SQL statement to a file named p2ql.sql. Run your query. SQL> SELECT ename,sal 2 FROM emp 3 WHERE sal > 2850; SQL> save p2q1.sql Created file p2q1.sql 2. Create a query to display the employee name and department number for employee number 7566. SQL> SELECT ename,deptno FROM emp WHERE empno = 7566; 3. Modify p2q1.sql to display the name and salary for all employees whose salary is no in the range of $1500 and $2850. Resave your SQL statement to a file named p2q3.sql. Rerun your query. SQL> edit p2q1.sql SELECT ename,sal FROM emp WHERE sal not between 1500 and 2850 / SQL> start p2q3.sql 4. Display the employee name, job, and start date of employees hired between February 20, 1981, and May 1, 1981. Order the query in ascending order by start date. SQL>SELECT ename, job, hiredate
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.

Page1 / 3

Assignment6-fall2006ans - 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