Manish Dodiya
Manish Dodiya

Reputation: 35

SQLite avoiding duplicate entries in android

I am working on a project to get appointment and in the appointment project client get appointment of doctor.

In case date is 03/04/2014 and time is 04:00 pm and other client get appointment and if he insert date 03/04/2014 and time is 04:00 pm at that time how to avoid this record to insert into database ?

Upvotes: 1

Views: 3009

Answers (1)

Ranjit
Ranjit

Reputation: 5150

I have given one answer here which helps to avoid duplicate entries by using SQLite. Check once. It may help you.

You can use UNIQUE constraint when you will create the column in database table. Which will help to avoid duplicate entries at the time of inserting.

Upvotes: 1

Related Questions