0
I created a table in Sqlite3, but forgot to add AUTO INCREMENT
in the column id
.
I tried to use ALTER TABLE
to solve the problem, but I haven’t been able to.
In SQLITE, it is allowed to set a column as auto increment, after the table has already been created?
If not, what is the solution to make my field id
as auto increment?
My scheme currently is:
CREATE TABLE users (id INTEGER, name STRING);
Wallace see if this helps: http://stackoverflow.com/questions/631060/can-i-alter-a-column-in-an-sqlite-table-autoincrement-after-creation
– Miguel
I don’t know much about the command line. I sometimes appeal to this application: http://sqlitebrowser.org/
– Diego Souza
@Zooboomafoo the tip is good, I will take a look yes. Until then, I always fiddled in SQLITE via command line.
– Wallace Maxters