[Assignments] Simple Queries in SQL — Chapter 12 Assignments (Q/A)

|
Table of Contents

19. Write SQL commands for the following on the basis of given table Teacher:

No.NameAgeDepartmentDateofjoinSalarySex
1Jugal34Computer10.1.9712000M
2Sharmila31History24.3.9820000F
3Sandeep32Maths12.12.9630000M
4Sangeeta35History1.7.9940000F
5Rakesh42Maths5.9.9725000M
6Shyam50History27.6.9830000M
7Shiv Om44Computer25.2.9721000M
8Shalakha33Maths31.7.9720000F
Table : Teacher
  1. To show all information about the teacher of history department.
  2. To list the names of female teachers who are in Hindi department.
  3. To list names of all teachers with their date of joining in ascending order.
  1. SELECT * FROM Teacher
    WHERE Department = "History";
  2. SELECT Name FROM Teacher
    WHERE Sex = "F" AND Department = "Hindi";
  3. SELECT Name, Dateofjoin FROM Teacher
    ORDER BY Dateofjoin;
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *