Esai Seshan Mysql Practical 2
Esai Seshan Mysql Practical 2
DML statements.
Esai Seshan , ROLL NO:25
I]Table 1:Member
1]Create the table Member with a Primary key constraint on TNO and NOT
NULL constraints on TNAME, SALARY, AREA, AGE, GRADE, and DEPT. Decide your
own suitable data types.
8] Add one more column SNO as an integer data type as the first field.
9] Add one more column BONUS as an integer data type at the end.
4] Display EMPNO and ENAME of all employees from the table Empl.
5] Display ENAME, SAL, and SAL added with COMM from the table Empl.
8] List all records where salary is less than 10000 from the table Empl
9] List all records where salary is between 20000 and 50000 from the
table Empl.
10] List the details of all employees who have four letters in their name.
11] List the details of all employees whose name starts with 'M'.
12] List the details of all employees whose name ends with 'A'.
13] List the names of all employees whose commission is not null.
14] List the names of all employees who are either CLERK or SALESMAN.
15] List all records in descending order of department number.
2] To display a report, showing coach name, pay, age, and bonus (15% of pay)
for all the coaches.
3] Write a SQL query to display all the information of coaches who are getting a
salary in the range of 10000 to 20000.
4] How can you display all the information of coaches who are less than 35 years
of age using SQL?
5] What SQL query would you use to display all the information of KARATE and
BASKETBALL coaches?
6] Write a SQL query to display all the information about male coaches having
age above 35.
7] How can you retrieve all the information of coaches having C05 or C07 as
coach_id using SQL?
8] What SQL query would display all the information of coaches who were hired
in the year 1998?
10] To display information of all the coaches whose name starts with S.
11] To display information of all the coaches whose name ends with A.
12] To display information of all the coaches who have five-letter names.
13] To list the names of all coaches with their date of joining (DATOFJOIN) in
descending order.
14] To list all the information about coaches in ascending order of age.
15] To list all the information about coaches in descending order of age and
ascending order of pay.
16] To list all the information about coaches in ascending order of name.
17] To increase the pay of all the coaches by 1000.
20] To change the age to 47 and sports to SWIMMING for coaches whose
coach_id is C08.
21] To delete all the records of male coaches who are below 35 years of age.