On 8/6/2013 5:28 PM, Baruch Burstein wrote:
I ran the following 2 commands:

create table tests (id INTEGER PRIMARY KEY, name TEXT UNIQUE);
insert into tests values ('test 1');


and got the following error:

Error: table tests has 2 columns but 1 values were supplied


Since the id column is an alias for the rowid, shouldn't I be able to not
supply it?

Yes you should be. You do that by providing an explicit list of columns that omits it:

insert into tests(name) values ('test 1');

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to