in Databases retagged by
689 views
0 votes
0 votes

Here why does the 5th query  select * from employees natural join works_on where PID = 'X' AND PID='Y'; is not working

The queries are 

The output are

in Databases retagged by
by
689 views

4 Comments

@ankitgupta.1729

check this point too, and check 2nd table.

There 1 is not the key , but 1,X is the key, because 1 is not unique, but 1,X is unique.

Another point think about division operation

If there all attributes matches, then only returns. otherwise not return

So, it is possible to have 2 values for the query , then returns true.(maynot be in same row definitely)

right?

0
0
not getting mam... question is not related to key.. suppose instead of condition PID='X' and PID ='Y', If condition is PID='X' and NAME='A' then what should be output acc.  to u and how it comes?
0
0

@ankitgupta.1729

I havenot got , what ur query is.

Plz. see this example

PID=X, say X means employee who wear white shirt.

PID=Y, say Y means employee who wear red tie

Those who wear both can enter in Company.

Can this not a possibility?

0
0

Please log in or register to answer this question.

Related questions

0 votes
0 votes
2 answers
3