SQL Q
SQL Q
2. Create a table called PET in the PETSHOP database that has the following structure.
6. Because some pets might have the same name, remove the unique property from
PetName.
1
BDD4213 BUSINESS SYSTEMS DEVELOPMENT SQL
11. List the Male pets which are Dogs and Cats. Use the IN operator. Display only the
Petname, PetType and PetAge.
12. Sort the record in descending order for PetAge and ascending order for PetWeight.
13. Display the records of pets whose weight is between 3 kg and 8 kg. Use the between
keyword.
UPDATE PETS
14. Edit the PetName of the 5th record to “Chicky” and the Petweight to 0.65.
SET PetName = 'Chicky'
SET PetWeight = 0.65
15. List the pets without weight. WHERE PetID = 5 ;
2
BDD4213 BUSINESS SYSTEMS DEVELOPMENT SQL
16. Search for pets whose names ends with “ty”. Use wildcard for this question.
17. Show the list of pets with age and weight are less than 5.