Answer-key 1&2&3 - DATABASE DESIGN-answer key LAB...

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

View Full Document Right Arrow Icon
DATABASE DESIGN-answer key LAB TUTORIAL 1 Part1: performing SQL statements: Show out the results and save as script in the desktop (folder with your name)? 1. Using emp table, display all information for all employees who work as clerks. Write the statement below. SELECT * FROM EMP WHERE JOB ='CLERK'; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7369 SMITH CLERK 7902 17-DEC-80 800 20 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7934 MILLER CLERK 7782 23-JAN-82 1300 10 2. Using emp table, display employees names that earn more than $12500. Write the statement below. SELECT * FROM EMP WHERE SAL>12500; no rows selected 3. Using emp table, display all employees names who don t have commission. Write the statement below. SELECT ENAME,COMM FROM EMP WHERE COMM IS NULL; ENAME COMM SMITH JONES BLAKE CLARK SCOTT KING ADAMS JAMES FORD MILLER
Background image of page 1

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

View Full DocumentRight Arrow Icon
4. Display department names and the locations from dept table. Write the statement below. SELECT DNAME, LOC FROM DEPT; DNAME LOC ACCOUNTING NEW YORK RESEARCH DALLAS SALES CHICAGO OPERATIONS BOSTON 5. Display the ename, job, sal and deptno from the emp table for those whose names start with the word FOR plus one single character after it. SELECT ENAME, JOB, SAL,
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.

Page1 / 5

Answer-key 1&2&3 - DATABASE DESIGN-answer key LAB...

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