Home > DeveloperSection > Interviews > Why SQLite not allow in same table on different rows if we use '0' and '0.' as a primary key

Posted on    September-30-2015 12:53 AM

 SQLite Database  Sqlite  Sqlite3 
Ratings:
 1 Answer(s)
  415  View(s)
Rate this:

Tarun Kumar

Total Post:107

Points:535
Posted on    September-30-2015 12:53 AM

When primary key is numeric type then the problem is occurs, if we use TEXT as a datatype with primary key then it will execute successfully. All the rows having unique primary key. For a column with a numeric type, SQLite thinks that '0' and '0.0' are the same values because they compare it equal to one another numerically. so the value will not be unique.


Don't want to miss updates? Please click the below button!

Follow MindStick