1.

Why Doesn't Sqlite Allow Me To Use '0' And '0.0' As The Primary Key On Two Different Rows Of The Same Table?

Answer»
  1. This PROBLEM occurs when your primary KEY is a numeric TYPE.
  2. Change the datatype of your primary key to TEXT and it should work.
  3. Every row must have a unique primary key.
  4. For a column with a numeric type, SQLite thinks that '0' and '0.0' are the same value because they compare equal to ONE another numerically.
  5. HENCE the values are not unique.



Discussion

No Comment Found