{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Session6-b

Session6-b - SQL DML Session 6(CSCI-585 Database Management...

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

View Full Document Right Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 SQL DML Session 6 (CSCI-585)
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
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 Example Schema Emp ( EmpNo , Name, Job, Sal, Comm, HireDate, Mgr , DeptNo ) Dept ( DeptNo , Name, Location) DeptNo Number(2) Name Varchar2(14) Location Varchar2(13) EmpNo Number(4) Name Varchar2(10) Job Varchar2(9) Sal Number(7,2) Comm Number(7,2) HireDate Date Mgr Number(4) DeptNo Number(2) Emp Dept
Background image of page 2
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Example Relations EMPNO NAME JOB MGR HIREDATE SAL COMM DEPTNO 7369 SMITH CLERK 7902 17-DEC-80 800 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7839 KING PRESIDENT 17-NOV-81 5000 10 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7934 MILLER CLERK 7782 23-JAN-82 1300 10 DEPTNO NAME LOCATION 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON Dept Emp
Background image of page 3

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

View Full Document Right Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 INSERT Statement To create a tuple in SQL the following ‘Insert’ command is required: insert into R ( attribute 1 , attribute 2 , … attribute n ) values ( value 1 , value 2 , … value n ) insert into Emp ( empno , name , job , sal , comm , hiredate , mgr , deptno ) values ( 7839, ‘King’, ‘President’, 5000, NULL, ‘17-Nov-81’, NULL, 10)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 13

Session6-b - SQL DML Session 6(CSCI-585 Database Management...

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

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