Skip to content
Advertisement

Tag: not-exists

How to select rows where multiple values do not exist

Scenario: Charlie, Amy and Robert have each filled out a survey which asks the user to select all the sports they are interested in. The question is multiple choice. In the table surveyData each row represents one of the answers each user chose. so Charlie(0001) chose basketball, rugby, acrobatics and darts. I would like to select from the table all

Oracle SQL Subquery – Usage of NOT EXISTS

I used a query to find a list of Primary Keys. One Primary key per each ForiegnKey in a table by using below query. Let us say this is the result : 1,4,5 NOw I have another table – Table B that has list of all Primary keys. It has 1,2,3,6,7,8,9 I want a write a query using the above

Advertisement