Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
6
Answers
Insert into table if record don't exist
CHAITANYA KIRAN KASANI
9y
518
1
Reply
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');
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
set column autogenerate numbers
Login query