5. Look at the table “ Student” given below and solve the following:- [18]
Admno Sname Class Address gender Marks
123 rahul 12a jmt Male 45
124 puja 12a dhn Female 47
125 sundar 12b NULL Male 35
a) Write the code to create the table “student” above.
b) Write the code to Insert the value in a table all three rows
c) Write the sql query to display all the data from the table
d) Write the query to display the names of all the male students.
e) Display all the details of students who belong from jmt
f) Display all the details whose marks more then 40
g) Write the sql query to delete the record whose Address is dhn
h) Display all the details sorted by marks in ascending order.
i) Modify all the marks and increase by 5 marks.
Answers
Answer:
singhjaiprakash396
8 hours ago
Computer Science
Secondary School
. Look at the table “ Student” given below and solve the following:-
Admno Sname Class Address gender
123 rahul 12a jmt Male
124 puja 12a dhn Female
125 sundar 12b NULL Male
126 rajan 12a jmt Male
a) Write the code to create the table “student” above.
b) Write the code to Insert the value in a table all three rows
c) Write the sql query to display all the data from the table
d) Write the query to display the names of all the male students.
e) Display all the details of students who belong from jmt
f) Display the details of all the student whose address is not given.
g) Display unique address from student table
h) Display all the details of students arranged in descending order of their name.
i) Display admno and name of those students who belong from ’ 12a’ and ‘12b’
j) Display all the details whose class is 12a arranged in ascending order of their name.