I am trying to insert contacts into database but does not want to duplicate already existing contact.
Not sure INSERT has WHERE CLAUSE.
Any ideas?
Perhaps you want to do an "upsert"? That means that you try to do an INSERT, and if the record already exists, you do an UPDATE instead.
To do that, first use a SELECT to see if the record already exists. If the contact isn't in the database, do an INSERT. If the contact is already in the database, do an UPDATE.