0% found this document useful (0 votes)
5 views13 pages

Ip Project - SQL Commands

The document outlines a series of SQL commands related to managing an employee table, including creating the table, inserting data, and various selection and manipulation queries. It covers commands for filtering, counting, sorting, and updating employee records based on specific criteria. Additionally, it includes commands for data retrieval and table structure description.
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)
5 views13 pages

Ip Project - SQL Commands

The document outlines a series of SQL commands related to managing an employee table, including creating the table, inserting data, and various selection and manipulation queries. It covers commands for filtering, counting, sorting, and updating employee records based on specific criteria. Additionally, it includes commands for data retrieval and table structure description.
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/ 13

SQL COMMANDS

Q.1- Create an employee table which includes : employee id, name,


dept, salary, age and address of the employees.

Command:

Q.2- Insert the values/ data in the table.

Command:
Q.3- Print the table.

Command:

Output:
Q.4- Write a command to select from employee where dept = sales.

Command:

Output:
Q.5- Write a command to select two columns from the employee.

Command:

Output:
Q.6- Write a command to select names starting with A.

Command:

Output:
Q.7- Count the number of rows in the table.

Command:

Output:
Q.8- double the salary of the employees.

Command:

Output:
Q.9- Write a command to sort the salary in descending order.

Command:

Output:
Q.10- Select the employee between the age of 25 and 30.

Command:

Output:
Q.11- Write a command to arrange the names in alphabetical order.

Command:

Output:
Q.12- Write a command to delete a row from the table.

Command:

Output:
Q.13- Use Describe command.

Command:

Output:
Q.14- Write a command to find the average salary of the employees.

Command:

Output:

You might also like