Reputation: 35
i am trying to delete row number 1 and 3, which when compared with row number 2, are same except for procurement_type. There are many more cases like this. This is just for an illustration. Please suggest me sql queries for oracle sql.
Upvotes: 0
Views: 42
Reputation: 3382
Considering your later comment:
DELETE
FROM some_table st
WHERE procurement _type = 'E'
AND EXISTS (SELECT 1
FROM some_table st
WHERE procurement _type = 'F'
AND srn = st.srn
... /* the other columns you want to compare with*/);
Upvotes: 1