Can anyone help me in Sqlite query
I created column 'ID' and gave constraint as 'Primary key', While inserting the values for other columns it is throwing an error to pass the value for 'ID'.
Tibor Santa and [user id="4354920"]Calviղ[/user] Thanks for your help
Sultan Shaikh you can also manually specify the value of the ID if you want, when you do the insert. By using AUTOINCREMENT, the database will assign a number to each new row, based on an algorithm. Now that Calvin has already told you what is the problem, you are only a Google search away from finding out more: https://www.sqlite.org/autoinc.html
Set AUTOINCREMENT to the ID
@Calvin, Data type is int then why should we add autoincrement?
Tibor Santa I tried with manual entry, but it is allowing me for duplicate ID. I am not getting any error while entering the same ID which I already have.
Tibor Santa Why did you use executemany instead of using execute for INSERT query?
It should not make any difference. Executemany has nice syntax to work on a data structure that contains all the relevant fields, and no need to write a loop. I copied and adjusted the example from python standard documentation. Maybe you have a problem with commit missing? You did not link your own code, so I can only guess. Maybe I shouldn't. :)
Int data type is not auto increment by default
Mia I got the solution
What is the best coding language
When you want to make a book in JS, then how do you put text other than the page nmr. on the page?