How to prevent to insert duplicate value in sqlite database (if duplicate then overwrite)

前端 未结 6 1283
余生分开走
余生分开走 2021-01-05 15:34

I had created two table in my database, In both table I am inserting value at the same time, now what I want to do is that, I want to insert record in second table, but the

6条回答
  •  余生分开走
    2021-01-05 16:26

    While creating your table, put constraint on your column(Primary key or Unique key).This will not only the duplicate value to be inserted into your database.

提交回复
热议问题