remove double entry from SQL command