EXAM 2 - David Carothers Capitol College CS220 Database...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: David Carothers Capitol College CS220 Database Management EXAM 2 1. DESC SALGRADE Name Null? Type----------------------------------------- -------- ------- GRADE NUMBER LOSAL NUMBER HISAL NUMBER SELECT * FROM SALGRADE GRADE LOSAL HISAL----- ---------- ---------- 1 700 1200 2 1201 1400 3 1401 2000 4 2001 3000 5 3001 9999 2. select emp.ename, emp.job, to_char(hiredate, 'Month Day "," YYYY') as Hiredate, to_char(add_months(hiredate, 36), 'Month Day "," YYYY') as Eligible from emp emp, dept dept where dept.dname = 'SALES' and emp.deptno = dept.deptno; ENAME JOB HIREDATE Eligible date---------- --------- -------------------------- -------------------------- ALLEN SALESMAN February Friday , 1981 February Monday , 1984 BLAKE MANAGER May Friday , 1981 May Tuesday , 1984 MARTIN SALESMAN September Monday , 1981 September Friday , 1984 JAMES CLERK December Thursday , 1981 December Monday , 1984 TURNER SALESMAN September Tuesday , 1981 September Saturday , 1984 WARD SALESMAN February Sunday , 1981 February Wednesday , 1984 3. select emp.ename, emp.job, mgr.ename, mgr.job from emp emp, emp mgr where emp.mgr = mgr.empno(+) ENAME JOB ENAME JOB---------- --------- ---------- --------- SCOTT ANALYST JONES MANAGER FORD ANALYST JONES MANAGER ALLEN SALESMAN...
View Full 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

EXAM 2 - David Carothers 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