Skip to content
Advertisement

Tag: except

SQL query for EXCEPT or NOT IN

I’m new to SQL and I am trying to write a query on PostgreSQL to find the cust_ID and customer name of each customer at the bank who only has a loan at the bank, and no account. The database schema is: The results should have only these 3 customers: My two attempts for this query are: 1) Where my

Using EXCEPT clause in PostgreSQL

I am trying to use the EXCEPT clause to retrieve data from table. I want to get all the rows from table1 except the one’s that exist in table2. As far I understand, the following would not work: The only way I can use EXCEPT seems to be to select from the same tables or select columns that have the

Advertisement