create table emp8078

Upload: yatin-ssatra

Post on 05-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Create Table Emp8078

    1/30

    1) Create table EMP_8078 with the following fields:

    EMPNO INTEGER PRIMARY KEY

    ENAME VARCHAR2 (20) NOT NULL

    JOB VARCHAR2 (20) NOT NULL

    MGR INTEGERHIREDATE DATE NOT NULL

    SAL NUMBER (6, 2) NOT NULLCOMM NUMBER (4, 2)

    DEPTNO NUMBER NOT NULL

    1

  • 7/31/2019 Create Table Emp8078

    2/30

    2) Describe the table EMP_8078

    2

  • 7/31/2019 Create Table Emp8078

    3/30

    3) Change the size of the fields JOB from VARCHAR2 (20) to VARCHAR2(30)

    3

  • 7/31/2019 Create Table Emp8078

    4/30

    4) Add 1 more field for DEPT VARCHAR2(30) to EMP_8078 table

    4

  • 7/31/2019 Create Table Emp8078

    5/30

    5) DROP the field DEPT

    6) INSERT values in the Table EMP_8078

    5

  • 7/31/2019 Create Table Emp8078

    6/30

    7) Display all the records from the table SHUBHAM_8078

    6

  • 7/31/2019 Create Table Emp8078

    7/30

    8) Display all DEPTNO from the Table SHUBHAM_8078

    7

  • 7/31/2019 Create Table Emp8078

    8/30

    9) Eliminate Duplicate DEPTNO from Table SHUBHAM_8078

    8

  • 7/31/2019 Create Table Emp8078

    9/30

    9

  • 7/31/2019 Create Table Emp8078

    10/30

    10) Display a list of different combinations of JOB & DEPTNO from the Table

    SHUBHAM_8078

    10

  • 7/31/2019 Create Table Emp8078

    11/30

    11) Display Annual Salary with Employee Name from Table SHUBHAM_8078

    11

  • 7/31/2019 Create Table Emp8078

    12/30

    12) Display the Name of Employee and the Total Annual Salary of the Employee

    in the Table SHUBHAM_8078

    12

  • 7/31/2019 Create Table Emp8078

    13/30

    13) Combine Employee name & Employee no. under the heading EMPLOY

    13

  • 7/31/2019 Create Table Emp8078

    14/30

    14) Display all the records of the Table SHUBHAM_8078 which is sorted by

    Employee name

    14

  • 7/31/2019 Create Table Emp8078

    15/30

    15) Display all the records from the table SHUBHAM_8078 which is sorted by

    hiredate latest by first

    15

  • 7/31/2019 Create Table Emp8078

    16/30

    16) Display all the records from the table SHUBHAM_8078 in which SALARY is

    greater than 2000

    16

  • 7/31/2019 Create Table Emp8078

    17/30

    17) Display all the records from the table SHUBHAM_8078 which is sorted by all

    the SALESMAN

    17

  • 7/31/2019 Create Table Emp8078

    18/30

    18) Display all the records from the table SHUBHAM_8078 in which

    COMMITION is greater than SALARY.

    18

  • 7/31/2019 Create Table Emp8078

    19/30

    19) Display all the records from the table SHUBHAM_8078 in which JOB is of

    CLERK and SALARY is less than 1000

    19

  • 7/31/2019 Create Table Emp8078

    20/30

    20) Display all the records from the table SHUBHAM_8078 in which JOB is of

    CLERK or SALARY is less than 1000

    20

  • 7/31/2019 Create Table Emp8078

    21/30

    21) Display all the records from the table SHUBHAM_8078 in which SALARY is

    between 1000 and 2000

    21

  • 7/31/2019 Create Table Emp8078

    22/30

    22) Display all the records from the table SHUBHAM_8078 in which SALARY is

    between 1000 and 2000

    22

  • 7/31/2019 Create Table Emp8078

    23/30

    23) Display all the records from the table SHUBHAM_8078 whose MANAGER is

    7698, 7839, 7566.

    23

  • 7/31/2019 Create Table Emp8078

    24/30

    24) Display all the records from the table SHUBHAM_8078 in which

    EMPLOYEE NAME starts with an alphabet S

    24

  • 7/31/2019 Create Table Emp8078

    25/30

    25) Display all the records from the table SHUBHAM_8078 in which

    EMPLOYEE NAME is a four letter name and the third letter is R

    25

  • 7/31/2019 Create Table Emp8078

    26/30

    26) Display all the records from the table SHUBHAM_8078 in which

    EMPLOYEE does not have a MANAGER.

    26

  • 7/31/2019 Create Table Emp8078

    27/30

    27) Display all the records from the table SHUBHAM_8078 in which

    DEPARTMENT NUMBER is not equal to 20

    27

  • 7/31/2019 Create Table Emp8078

    28/30

    28) Display all the records from the table SHUBHAM_8078 in which

    EMPLOYEE NAME ends with alphabet S.

    28

  • 7/31/2019 Create Table Emp8078

    29/30

    29) Display all the records from the table SHUBHAM_8078 in which SALARY is

    not equal to 1000.

    29

  • 7/31/2019 Create Table Emp8078

    30/30

    30) Display all the records from the table SHUBHAM_8078 which is sorted by

    hiredate in descending order.