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

Last updated:9/22/2020 12:10:34 PM

1 Answers

Tarun Kumar
Tarun Kumar

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