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.
Liked By
Write Answer
Why SQLite not allow in same table on different rows if we use '0' and '0.' as a primary key
Join MindStick Community
You have need login or register for voting of answers or question.
Tarun Kumar
30-Sep-2015When 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.