Answer the question
In order to leave comments, you need to log in
EXISTS predicate?
I can't figure out how exists works. Here is an example:
SELECT ship FROM Outcomes os
WHERE EXISTS (SELECT ship
FROM Outcomes oa
WHERE oa.ship = os.ship AND
result = 'damaged'
)
Answer the question
In order to leave comments, you need to log in
Well, you choose in exists by the condition result = damaged what do you want it to display?
But in general, the meaning is generally incomprehensible, in the same table, why make such a selection.
The same as such a request is obtained
SELECT ship FROM Outcomes os
WHERE result = 'damaged'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question