aspose file tools
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

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
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: 3709

Duplicate of Please continue the discussion there.
Consider Paul's rocket mass heater.
subject: Insert into table where not exists