-2

I have question to avoid Duplicate field in Database while using JSP and Servlet. Because when i am inserting product it can duplicate. So if anyone can add the duplicate value it shows Item/product already available. So i need to know how is that possible to perform the task.

1 Answers1

-2

Use unique key constraint,If you can't make the primary key, the only way to prevent inserting it again, is doing a select first. https://www.daniweb.com/programming/databases/threads/279923/check-for-duplicates-before-insert

Sreejesh K Nair
  • 563
  • 1
  • 6
  • 16
  • Please read [How do I write a good answer?](http://stackoverflow.com/help/how-to-answer) before attempting to answer more questions. –  Jan 26 '18 at 07:20