I have to delete the duplicate values by rows so that only unique rows are left.
Suppose I have the following values in my table.
no code name
1 001 ronald
1 001 NULL
2 002 peter
2 002 peter
3 003 john
3 003 john
4 004 NULL
4 004 chris
I have to delete the duplicate records so that the expected output is:
no code name
1 001 ronald
2 002 peter
3 003 john
4 004 chris
I tried using distinct and inserting the result to temp table, but it didn't work.
Does anyone have any solutions for this?
LIMIT 1to yourDELETE-Query?