File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Insert into table where not exists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

Insert into table where not exists

wafa khan
Ranch Hand

Joined: Apr 29, 2013
Posts: 42
Hi all of you
I have code to insert into table sql so it works but when i execute many times it will be inserted the same data then i have repetition
So i want do an query for Insert into table where not exists
i use it in many queries it works but here i have the insert from arraylist<>
i work with java

this is the code :

VLAN= it's the first column in table but not primary key
and table has 5 columns
Thank you for help
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3733

Duplicate of Please continue the discussion there.
I agree. Here's the link:
subject: Insert into table where not exists
It's not a secret anymore!