The following is a sql query which I wrote to delete all records in the placement table where the placement.op_number
= a list of returned records.
The subquery works fine alone and returns only the OP_NUMBER
column (with two rows).
The error I get is:
At most one record can be returned from the Sub-Query
DELETE
FROM PLACEMENT
WHERE PLACEMENT.OP_NUMBER = (SELECT OP_NUMBER
FROM Opening
WHERE opening.qual_code = "SEC-45");
What am I doing wrong?
Use
IN
instead of equals: