Professional Documents
Culture Documents
Ans: CREATE TABLE Student(Sno int primary key, Name varchar(20), Mark int);
Ans:-
Ans:-
RESULT/OUTPUT:
Question 5 : Display name and mark of all the details from the table STUDENT.
Ans:-
RESULT/OUTPUT:
Name Mark
Hafis P A 70
Gokul Krishna 65
Althaff Moosa 70
Gayathri Unnikrishan 71
Ann Maria Saji 69
Question 6 : Fetch the details of the student whose Sno is 100.
Ans:-
RESULT/OUTPUT:
Question 7 : Display name and mark of the student whose name is Altaff Moosa.
Ans:-
RESULT/OUTPUT:
Name Mark
Althaff Moosa 70
Question 8 : Display all the details of students whose mark is greater than or
equal to 70.
Ans:-
RESULT/OUTPUT:
Ans:-
RESULT/OUTPUT:
Question 10 : Write a Query to find Maximum (Highest) Mark from the table
STUDENT.
Ans:-
RESULT/RESULT
MAX(Mark)
71
Question 11 : Write a Query to find Minimum (Lowest) Mark from the table
STUDENT.
Ans:-
RESULT/OUTPUT
MIN(Mark)
65
Question 12 : Write a Query to find Total Mark from the table STUDENT.
Ans:-
RESULT/RESULT
SUM(Mark)
345
Question 13 : Write a Query to find Average Mark from the table STUDENT.
Ans:-
RESULT/OUTPUT
AVG(Mark)
69
Question 14 : Write a Query to Sort (Ascending order) table STUDENT based on
Name.
Ans:-
RESULT/OUTPUT:
Ans:-
Question 16 : Write a Query to delete all the details of students whose mark is
greater than 70