0% found this document useful (0 votes)
6 views3 pages

Experiment number7-QUERY

The document outlines Experiment No.-7 focused on implementing DDL queries, including creating a table named Employee_data with various attributes and inserting multiple employee records. It also details altering the table by adding a new column, renaming an existing column, and modifying a column's data type. Finally, it includes commands for truncating and dropping a table named Employee_info_1.

Uploaded by

prayasambawade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Experiment number7-QUERY

The document outlines Experiment No.-7 focused on implementing DDL queries, including creating a table named Employee_data with various attributes and inserting multiple employee records. It also details altering the table by adding a new column, renaming an existing column, and modifying a column's data type. Finally, it includes commands for truncating and dropping a table named Employee_info_1.

Uploaded by

prayasambawade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment No.

-7

Title: Implement DDL Queries

1.Create: table employee with attribute emp_name, emp_id,designation,address,salary.

create table Employee_data(ID int, Emp_Name varchar(10), Desiganation varchar(10) ,Address


varchar(10),Salary int);

insert values into table:

insert into Employee_data values(1,'Shubhangi','CEO','Pune',10000000000);

insert into Employee_data values(2,'Arati','Manager','Kolhapur',50000000);

insert into Employee_data values(3,'Varsharani','Assistant','Kolhapur',2000000);

insert into Employee_data values(4,'Vaishnvi','Employee','Walwa',70000);

insert into Employee_data values(5,'Shreya','Pion1','Bid',2000);

insert into Employee_data values(6,'Mrunal','Employee','Satara',600000);

insert into Employee_data values(7,'Samarth','Pion2','Miraj',1000);

insert into Employee_data values(8,'Tanmay','Pion3','Kolhapur',500);

insert into Employee_data values(9,'Harshada','Employee','Karad',800000);

insert into Employee_data values(10,'Diksha','Employee','Solapur',400000);

2.Alter: add age column in table Employee_info1


a. ALTER TABLE Employee_info1 add(age int)

b.ALTER TABLE Employee_info1 RENAME column desiganation TO post;


c. ALTER TABLE employee_infoo MODIFY job varchar2(25)

3. Truncate

TRUNCATE table Employee_info_1

4. Drop:

drop table Employee_info_1

You might also like