CBSE Class 12 Informatics Practices Question 14 of 103

Review of Database Concepts & SQL — Question 3

Back to all questions
3
Question

Question 2(b)

Ms. Manisha, a veterinarian, created a table 'VETERINARY' with the following columns:

ANIMAL_ID, VACCINATION_DATE, ANIMAL, OWNER_NAME

She wants to see the details of all the animals other than Dog and Cat which she has vaccinated.
She has written the following query:

SELECT * FROM VETERINARY WHERE ANIMAL NOT IN ('DOG', 'CAT');

Write a suitable alternate query for producing the same result.

Answer
SELECT * FROM VETERINARY 
WHERE ANIMAL != 'DOG' AND ANIMAL != 'CAT';