You are on page 1of 8

Database Management

system
LAB #06

Name :Alishba Altaf


Class :BSIT-4
Roll NO:Numl-f21-31702
Submitted To:Maam Sehrish
Using DDL Statements to Create and Manage Tables

Data Types
Data types that can be used in oracle are as follows:

Data Type Description


VARCHAR2(size) Variable-length character data

CHAR(size) Fixed-length character data

NUMBER(p,s) Variable-length numeric data

DATE Date and time values

LONG Variable-length character data (up to 2 GB)

CLOB Character data (up to 4 GB)

RAW and LONG Raw binary data


RAW
BLOB Binary data (up to 4 GB)

BFILE Binary data stored in an external file (up to 4 GB)

ROWID A base-64 number system representing the unique address


of a row in its table

Summary:

The overall summary of Data Definition Language (DDL) statements are given in the table.
LAB TASKS

1. Create “Department_Detail” table with the schema given below. Conform that the table
is created.

Output:

2. Create the “Employee_Detail” table based on the following table instance chart.
Confirm that the table is created.

Output:
3. Modify the “Employee_Detail” table to allow for longer employee last names. Confirm
your modifications.
Output:

4. Confirm that both tables created above are stored in the data dictionary.
Output:
5. Drop the Employee_Detail table.
Output:

6. Rename the “Employee2” table as “Employee_Detail” table.


Output:
7. Add
a

comment (of your choice) to Employee_Detail. Confirm your additions in the data
dictionary.
Output:

8. Drop the First_Name column from the Employee_Detail table. Confirm your
modifications by checking the description of the table.

Output:

9. In the Employee_Detail table, mark the DEPT_ID column in the Employee_Detail table
as unused. Confirm your modifications by checking the description of the table.
Output:
10. Drop all the UNUSED columns from the Employee_Detail table. Confirm your
modifications by checking the description of the table.
Output:

You might also like