Computer Science, asked by lakshyasunilchauhan1, 29 days ago

WRITE SQL FOR THE FOLLOWING QUESTIONS

Attachments:

Answers

Answered by Equestriadash
2

(i) To create the table 'Marks'.

  • Create table Marks(Student_ID int Primary Key, Name varch‎ar(40) Not null, Marks int);

(ii) To insert the given data into the table.

  • Insert into Marks values(1, 'Karan', 80);
  • Insert into Marks values(2, 'Tarun', 76);
  • Insert into Marks values(3, 'Ankita', 46);
  • Insert into Marks values(4, 'Kush', 59);

(iii) To display the names and marks of those students who've marks above 70.

  • Select Name, Marks from Marks where Marks > 70;

(iv) To display students having marks above 40.

  • Select Student_ID, Name from Marks where Marks > 40;

(v) To calculate the minimum marks.

  • Select min(Marks) from Marks;
Similar questions