Computer Science, asked by rishikaa1369, 7 months ago

i. Consider the following table 'LIST' and write SQL commands (queries) for the following:
(*NOTE: Refer to the image of LIST table)
i. Display the details of persons who have flat in 'Dadar'.
ii. Display all the records in ascending order of 'Surname'.
iii. Change the ID of Samir Shah to 10.
iv. Display the Names from List table who's Surname is Sharma or Joshi.
V. Insert a new record with following data (11, “Mitesh”, “Gupta", "Goregoan", "Bandra")

*

Attachments:

Answers

Answered by Equestriadash
9

i. Display the details of people who have a flat in 'Dadar'.

  • Select * from List where FlatHave = 'Dadar';

ii. Display all the records in ascending order of 'Surname'.

  • Select * from List order by Surname;

iii. Change the ID of 'Samir Shah' to 10.

  • Update List Set ID = '10' where Name = 'Samir';

iv. Display the Names from the table who's Surname is 'Sharma' or 'Joshi'.

  • Select Name from List where Surname in ('Sharma', 'Joshi');

v. Insert a new record with the following data: (11, “Mitesh”, “Gupta", "Goregoan", "Bandra").

  • Insert into List values(11, 'Mitesh', 'Gupta', 'Goregoan', 'Bandra');
Similar questions