I am developing an android application in which i have a local database.I want that if user has already entered a medicine name say a.Then again i went to edittext and typed a .It should not add in the local database,How to do this

I tried to follow this link

[Insert if not exists?](https://stackoverflow.com/questions/5638049/insert-if-not-exists)

can anyone guide me

Thanks
Tushar