SQL Assignment#3 - David Carothers CS-220 10/29/07...

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

View Full Document Right Arrow Icon
David Carothers CS-220 10/29/07 Assignment #7 SQL assignment #3 (Microsoft Word made a lot of the columns crooked) 1. input: select sysdate as "Date" from dual; Date --------- 22-OCT-07 2. input: select empno, ename, sal, round(sal*1.15,0) as "New Salary" from emp; EMPNO ENAME SAL New Salary ---------- ---------- ---------- ---------- 7369 SMITH 800 920 7499 ALLEN 1600 1840 7521 WARD 1250 1438 7566 JONES 2975 3421 7654 MARTIN 1250 1438 7698 BLAKE 2850 3278 7782 CLARK 2450 2818 7788 SCOTT 3000 3450 7839 KING 5000 5750 7844 TURNER 1500 1725 7876 ADAMS 1100 1265 EMPNO ENAME SAL New Salary ---------- ---------- ---------- ---------- 7900 JAMES 950 1093 7902 FORD 3000 3450 7934 MILLER 1300 1495 14 rows selected. Input: save "E:\CS220\p3q2.sql" Created file E:\CS220\p3q2.sql 3. @ E:\CS220\p3q2.sql EMPNO ENAME SAL New Salary ---------- ---------- ---------- ---------- 7369 SMITH 800 920 7499 ALLEN 1600 1840 7521 WARD 1250 1438 7566 JONES 2975 3421 7654 MARTIN 1250 1438
Background image of page 1

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

View Full DocumentRight Arrow Icon
7698 BLAKE 2850 3278 7782 CLARK 2450 2818 7788 SCOTT 3000 3450 7839 KING 5000 5750 7844 TURNER 1500 1725 7876 ADAMS 1100 1265 EMPNO ENAME SAL New Salary ---------- ---------- ---------- ---------- 7900 JAMES 950 1093 7902 FORD 3000 3450 7934 MILLER 1300 1495 14 rows selected. 4. @ E:\CS220\p3q2.sql select empno, ename, sal, round(sal*1.15,0) as "New Salary", (sal*1.15)-sal as Increase from emp EMPNO ENAME SAL New Salary INCREASE ---------- ---------- ---------- ---------- ----------
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.

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 / 6

SQL Assignment#3 - David Carothers CS-220 10/29/07...

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

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