Insert into table if record don't exist

May 27 2015 4:51 AM
hi,
The below is the sql statement that inserts the record if only the record is not exists in table.. but the statement i written is inserting multiple times the same record... please help me to resolve my problem..
Hide Copy Code
INSERT INTO TableName(AccountNo,Customer,ContactNo) select 'AP1234','Saketh','984822338' FROM TableName WHERE NOT EXISTS(Select * From TableName Where AccountNo='AP1234');

Answers (6)