Uploaded by ssj goku

MySQL Table Student

advertisement
MySQL Practical Question
Table – STUDENT
SRNO
NAME
CLASS
MARKS
GRADE
101
Ajay
XI Sc.
95.50
A1
201
Amay
XI Comm.
97.00
A1
301
Bhawana
XI Hum.
90.25
A2
401
Chirag
XI Sc.
85.50
A2
501
Deeksha
XI Comm.
65.50
B2
1. WAQ to open an existing database School?
2. WAQ to create a student given above?
(Hint: Primary Key & Not Null should be applied)
3. WAQ to insert the given records in the table student?
4. WAQ to display the structure of the table student?
5. WAQ to show the table student with the complete data?
6. WAQ to update the marks of all the students by 2 (as a bonus in a question)?
7. WAQ to modify the grade of a student named as Bhawana by ‘A1’?
8. WAQ to remove all the data inside the table student?
9. WAQ to display the complete data of the table student after modification?
10. WAQ to remove the complete table with its structure?
11. WAQ to add a new column named as DOJ with the desired datatype?
12. WAQ to update the date of joining of all the students by ‘2009-01-01’?
13. WAQ to change the datatype of the column Grade from char(2) to varchar(3)?
14. WAQ to update the column name from DOJ to DateOfJoin?
15. WAQ to modify the name of the table from STUDENT to STUD?
16. WAQ to update the marks of a student named as Deeksha by 5?
17. WAQ to change the grade of the student whose srno is 501 and marks are greater than
70 to ‘B1’?
18. WAQ to change the spelling of the class name ‘XI Comm.’ to ‘XI Com.’?
19. WAQ to correct the spelling of the student name “Bhawana” to “Bhawna”?
20. WAQ to remove the record of a student whose name is ‘Amay’ and srno is 201?
Download