Write a query to create a table Employee with the following columns: 

emp_id int, f_name varchar2(20), l_name varchar2(20), title varchar2(30),age int, yos int, salary int, perks int, email varchar2(60).

CREATE TABLE employee_data
(
emp_id int 
f_name varchar2(20),
l_name varchar2(20),
title varchar2(30),
age int,
yos int,
salary int,
perks int,
email varchar2(60)
);

On the basis of above table execute the following command:

1. Write a query to describe a table structure.
DESCRIBE employee_data;

2. Write queries to insert 5 rows of data into the table Employee.
INSERT INTO employee_data (f_name, l_name, title, age, yos, salary, perks, email) 
values ("Manish", "Sharma", "CEO", 28, 4, 20000, 5000, "mansh@bignet.com");

3. Write a query to rename a table.
RENAME age TO Age;

4. Write a query to truncate a table.
Truncate table employee_data;

5. Write a query to drop a table.
Drop table employee_data;


Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: