Enjoy them as they fly
Answers
a) Write the cσde to create the table “Student".
Creαte tαble Student(Admno int(3) Primαry Key, SName vαrchαr(20), Class vαrchαr(3), Address chαr(3), Gender vαrchar(6));
b) Write the cσde to insert the values in the table.
Insert into Student values(123, 'Rahul', '12A', 'jmt', 'Male');
Insert into Student values(124, 'Puja', '12A', 'dhn', 'Female');
Insert into Student values(125, 'Sundar', '12B', Null, 'Male');
Insert into Student values(126, 'Rajan', '12A', 'jmt', 'Male');
c) Write the command to display all the data from the table.
Select * from Student;
d) Write the command to display the names of all the male students.
Select SName from Student where Gender = 'Male';
e) Display all the details of students who belong from jmt.
Select * from Student where Address = 'jmt';
f) Display the details of all the students whose address is not given.
Select * from Student where Address is Null;
g) Display the unique addresses from the table.
Select distinct Address from Student;
h) Display all the details of students arranged in descending order of their names.
Select * from Students order by SName desc;
i) Display AdmNo and Names of those students who belong to ’12A’ and ‘12B’.
Select Admno, SName from Student where Class = '12A' or Class = '12B';
j) Display all the details of those students whose class is 12A arranged in ascending order of their names.
Select * from Student where Class = '12A' order by SName;
Answer:
plz mark me as brainlist bro plz