Computer Science, asked by gayathrizz0210, 6 months ago

please help Write the queries and syntax of My SQL
A)To increment marks by 10 .
B)To display name & marks of students, who are from section ‘A’.
. C)To display the information all the students, whose name is ANAND
D)To display student id, Name, DOB of those students who are born between ‘2005- 01-01’ and ‘2005-12-31’.
E)To display student id, Name, DOB, Marks of those male students
F)To display student id, Gender, Name, DOB, Marks of students whose division is B and who scored marks more than 50,.
G)To display the unique section available in the table.
H)To list the students details having class as xi and division is either C or D.
I)To display the details of all students whose division is not equal to E.
J)To display name and gender of all students whose student id lies between 300 and 400

Answers

Answered by Equestriadash
11

Since there isn't a table attached/displayed, I'll be naming the table as 'Student' and the columns as per what is mentioned in the question.

A) To increment marks by 10.

  • Update Student Set Marks = Marks + 10;

B) To display name & marks of students, who are from section ‘A’.

  • Select Name, Marks from Student where Section = 'A';

C) To display the information of all the students, whose name is ANAND.

  • Select * from Student where Name like 'Anand%';

D) To display Student ID, Name & DOB of those students who are born between ‘2005-01-01’ and ‘2005-12-31’.

  • Select StudentID, Name, DOB from Student where DOB between ‘2005-01-01’ and ‘2005-12-31’;

E) To display Student ID, Name, DOB & Marks of those who are male students.

  • Select StudentID, Name, DOB, Marks from Student where Gender = 'M';

F) To display Student ID, Gender, Name, DOB & Marks of students whose division is B and who scored marks more than 50;

  • Select StudentID, Gender, Name, DOB, Marks from Student where Section = 'B' and Marks > 50;

G) To display the unique sections available in the table.

  • Select distinct Section from Student;

H) To list the student details having class as XI & division as either C or D.

  • Select * from Student where Class = 'XI' and Section = 'C' or Section  = 'D';

I) To display the details of all students whose division is not equal to E.

  • Select * from Student where Section != 'E';

J) To display name & gender of all students whose Student ID lies between 300 and 400.

  • Select Name, Gender from Student where StudentID between 300 and 400;
Similar questions