0% found this document useful (0 votes)
2 views

prac 9

The document contains a series of SQL queries executed on an 'emp' table, displaying employee names, salaries, and IDs. It includes various selection criteria such as specific employee IDs, salary conditions, and ranges of employee IDs. The results show different subsets of employee data based on the specified conditions.

Uploaded by

lokareswapnil32
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)
2 views

prac 9

The document contains a series of SQL queries executed on an 'emp' table, displaying employee names, salaries, and IDs. It includes various selection criteria such as specific employee IDs, salary conditions, and ranges of employee IDs. The results show different subsets of employee data based on the specified conditions.

Uploaded by

lokareswapnil32
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/ 2

mysql> select*from emp;

+-------------+--------+-------+
| empname | empsal | empid |
+-------------+--------+-------+
| swapnil | 75000 | 2207 |
| didar | 80000 | 2208 |
| dnyaneshwar | 90000 | 2209 |
+-------------+--------+-------+
3 rows in set (0.01 sec)

mysql> select*from emp where empid=2207;


+---------+--------+-------+
| empname | empsal | empid |
+---------+--------+-------+
| swapnil | 75000 | 2207 |
+---------+--------+-------+
1 row in set (0.01 sec)

mysql> select*from emp where empsal!=80000;


+-------------+--------+-------+
| empname | empsal | empid |
+-------------+--------+-------+
| swapnil | 75000 | 2207 |
| dnyaneshwar | 90000 | 2209 |
+-------------+--------+-------+
2 rows in set (0.00 sec)

mysql> select*from emp where empid>2207;


+-------------+--------+-------+
| empname | empsal | empid |
+-------------+--------+-------+
| didar | 80000 | 2208 |
| dnyaneshwar | 90000 | 2209 |
+-------------+--------+-------+
2 rows in set (0.00 sec)

mysql> select*from emp where empid<=2208;


+---------+--------+-------+
| empname | empsal | empid |
+---------+--------+-------+
| swapnil | 75000 | 2207 |
| didar | 80000 | 2208 |
+---------+--------+-------+
2 rows in set (0.00 sec)

mysql> select*from emp where empid<2208;


+---------+--------+-------+
| empname | empsal | empid |
+---------+--------+-------+
| swapnil | 75000 | 2207 |
+---------+--------+-------+
1 row in set (0.00 sec)

mysql> select*from emp where empid>=2207;


+-------------+--------+-------+
| empname | empsal | empid |
+-------------+--------+-------+
| swapnil | 75000 | 2207 |
| didar | 80000 | 2208 |
| dnyaneshwar | 90000 | 2209 |
+-------------+--------+-------+
3 rows in set (0.00 sec)

You might also like