Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
19.2k views
in Information Technology by (71.3k points)

Consider the following table:

Student

Write commands in SQL for (i) to (iv):

(i) To display the details of all those students who have IP as their optional subject. 

(ii) To display name, stream and optional of all those students whose name starts with 'A'. 

(iii) To give an increase of 3 in the average of all those students of humanities section who have Maths as their optional subject. 

(iv) To display a name list of all those students who have average more than 75.

1 Answer

+1 vote
by (76.5k points)
selected by
 
Best answer

(i) select * from student where optional=‟IP‟;

(ii) select name, stream, optional from student where name like 'A%';

(iii) update student set average=average+3 where stream=‟Humanities‟ and optional='Maths';

(iv) select name from student where average>75;

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...