Professional Documents
Culture Documents
2.) Display Name and Total Salary (sum of Salary and Allowance of all personals.) The column
heading ‘Total Salary’ should be displayed. (Refer table from Q.1)
3.) Delete the record of Supervisors who have salary greater than 25000. (Refer table from Q.1)
4.)
Table : Teacher
5.) To list the names of all teachers with their date of joining in ascending. (Refer table from Q.4)
6.) To display name, bonus for each teacher where bonus is 10% of salary. . (Refer table from Q.4)
7.)
To display the record from table student in alphabetical order as per the name of the student.
11.)
Mark_1 Mark_2 Mark_3
Stu_id StuName
11 Mohan 75.0 65.0 70.0
Which
SQL 13 Kiran 70.0 69.0 68.0
statement would
give you 14 Deepak 69.0 70.0 following
output?
12 Balaji 140
14 Deepak 139
constraints?
13.) Write all SQL command based on Data Definition Language (DDL).
14.) How do you retrieve all records from a table in existing databases?
15.) Write a query to display the name which has more than 4 letter in an existing tables?
16.) Write a query to fetch customers whose names start with the letter "A."
18.) Write a query to prove the primary key condition (using examples)?
20.) How do you change the value in empty place of the given table?
TABLE: cs
Siva 10123 23
Gopal 10223 84455424 27
Guru 73882313
21.) Populate the table using SQL command (refer table: cs)?
22.) Write a query to display the oldest person in the table (refer table: cs)?
Display the names of the student who have grade ‘C’ in either Game1 or Game2 or both
25.) Display the names of the student who have same game for both Game1 and Game2. (Refer table:
sport)
26.) Display all the Name sorted in ascending order. (Refer table: sport).
27.)
To increase the prize by 1000 for those customer whose name starts with ‘S’?
28.) Write SQL command for average value for the condition “like %r %”.( refer
table from Q.27)
29.) Write SQL command for creating foreign key using CUSTOMER and
COMPANY table. (Refer table from Q.27).
30.) Write SQL command to display designation without duplicate entries from
the CUSTOMER and COMPANY table (Refer table from Q.27).