{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignment 7-Fall2007ans - Capitol College CS220 Database...

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

View Full Document Right Arrow Icon
Capitol College CS220 - Database Management Assignment # 7 SQL Assignment # 3 1. Write a query to display the current date. Label the column Date. SQL> select sysdate “Date” from dual; 2. Display the employee number, name, salary, and salary increase by 15% expressed as a whole number. Label the column New Salary. Save your SQL statement to a file names p3q2.sql SQL> SELECT empno, ename, sal, ROUND(sal*1.15,0) “New Salary” FROM emp; SQL> SAVE p3q2.sql Created file p3q2.sql 3. Run your query in the file p3q2.sql SQL> START p3q2.sql 4. Modify your query p3q2.sql to add an additional column that will subtract the old salary from the new salary. Label the column Increase. Rerun your query. SQL> EDIT p3q2.sql SELECT empno, ename, sal, ROUND(sal*1.15,0) “New Salary”, ROUND(sal*1.15,0) - sal “Increase” FROM emp / SQL> START p3q2.sql;
Background image of page 1

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

View Full Document Right Arrow Icon
5. Display the employee’s name, hire date, and salary review date, which is the first Monday after six months of service. Label the column REVIEW. Format the dates to appear in the format similar to “Sunday, the Seventh of September, 1981.”
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}