Identify the SQL that answers each of the following questions: Who are the pets
ID: 3744876 • Letter: I
Question
Identify the SQL that answers each of the following questions:
Who are the pets in the database,sorted by ID number?
Who are the pets in the database,sorted by name?
Who are the pets in the database,sorted by name, in reverse order?
What are the names,species, and breeds of the pets in the database,sorted by ID number?
What are the names,species, and breeds of the pets in the database,sorted by name?
What are the names,species, and breeds of the pets in the database,sorted by name, in reverse order?
What are the names of the pets in the database,sorted by ID number?
What are the names of the pets in the database,sorted by name?
Explanation / Answer
Ans1 Select * from PET Order by PETID;
Ans2 Select * from PET Order by PETNAME;
Ans3 Select * from PET Order by PETNAME DESC;
Ans4. Select PetNAME,PetTYPE,PetBreed from PET Order by PETID;
Ans5. Select PetNAME,PetTYPE,PetBreed from PET Order by PETNAME;
Ans6. Select PetNAME,PetTYPE,PetBreed from PET Order by PETNAME DESC;
Ans7. Select PetNAME from PET Order by PETID;
Ans8. Select PetNAME from PET Order by PETNAME;