WHY SQLITE NOT ALLOW IN SAME TABLE ON DIFFERENT ROWS IF WE USE '0' AND '0.' AS A PRIMARY KEY

Tarun Kumar

Total Post:107

Points:535
Posted by  Tarun Kumar
 668  View(s)
Ratings:
Rate this:
  1. Tarun Kumar

    Post:107

    Points:535
    Why SQLite not allow in same table on different rows if we use '0' and '0.' as a primary key

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!