0% found this document useful (0 votes)
5 views1 page

SQL Experiment 1

SQL hands on

Uploaded by

Naga Sai Teja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

SQL Experiment 1

SQL hands on

Uploaded by

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

SQL Experiment 1

QUERY 01: Write a query to create a table employee with empno, ename, designation, and salary.
QUERY 02: Write a query to display the column name and data type of the table employee.
QUERY 03: Write a query for creating a table from an existing table with all the fields.
QUERY 04: Write a query for creating a TABLE from an existing table with selected fields.
QUERY 05: Write a query to alter the column EMPNO NUMBER (4) TO EMPNO NUMBER
QUERY 06: Write a query to add a new column Increment into employee table.
QUERY 07: Write a query to add multiple columns DOB and DOJ into employee.
QUERY 08: Write a query to drop a column DOJ from an existing table employee.
QUERY 09: Write a query to rename table emp to employee.
QUERY 10: Write a query to insert the records in to employee.
QUERY 11: Write a query to display the records from employee.
QUERY 12: Write a query to insert 10 records into employee using substitution method.
QUERY 13: Write a query to change the salary of a given employ (update the records) from employee.
QUERY 14: Write a query to update multiple records from employee.
a. Increase the salary by 5000/- to the employees whose designations is ‘Manager’)
b. Calculate the increment for each employ as increment= 15% of the salary.
QUERY 15: Write a query to list empno, ename and designation fields.
QUERY 16: Write a query to list the employees whose salary falls in the range 15000 to 25000 using
BETWEEN clauses.
QUERY 17: Write a query to illustrate IN clause ( List the employees whose designation is either Clerk or
Manager or Asst. Manager).
QUERY 18: Write a query to sort the employee data based on ename.
QUERY 19: Write a query to list the employees whose name starts with ‘S’.
QUERY 20: Write a query to list the employees except ‘Manager’ and ‘Supervisor’ in descending order of
their salaries.

You might also like