710 views
0 votes
0 votes

Suppose there are two tuples in Animals relation with different IDs but of same type and in Adoption table there is a tuple with an ID that matches with the  ID of first tuple in Animal relation. AND during the query evaluation, the type of first tuple of the animal relation will not be selected whereas the SQL query will select type of second tuple of animal relation as there is no tuple in ADoption that have same Id as of second tuple of Animal relation . 

Hence this is wrong to say that Distinct type of animals will be selected who have not had any adoption? right?

 

I know my answer is wrong here for the case when all Ids of the same type are also present in Adoption table . but the thing is given answer is also wrong here. 

Correct me if i’m wrong.

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
2
rayhanrjt asked Jan 6, 2023
768 views
Write SQL command to find DepartmentID, EmployeeName from Employee table whose average salary is above 20000.
2 votes
2 votes
1 answer
3
Subhrangsu asked Jun 18, 2022
447 views
Write SQL query to show all employees hired on June 4,1984 (non-default format)emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
1 votes
1 votes
1 answer
4
Shubhanshu asked Dec 24, 2018
1,306 views
According to me it should be – “Retrieve the names of all students with a lower rank, than all students with age < 18 ”