avoid duplicate in sql code example
Example 1: sql delete duplicate
-- Oracle
DELETE films
WHERE rowid NOT IN (
SELECT min(rowid)
FROM films
GROUP BY title, uk_release_date
);
Example 2: how to query without duplicate rows in sql
SELECT DISTINCT col1,col2... FROM table_name where Condition;