SQLite Forum

CREATE TABLE allowing empty column name
Login
https://www.sqlite.org/syntax/column-def.html shows column-name as required.  However, the following does not give an error.:

$ sqlite3
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table foo(integer primary key);
sqlite> insert into foo values (100);
sqlite> select * from foo;
100
sqlite> 

Is this an undocumented feature, or a bug?  Or is this normal SQL syntax that I'm just misunderstanding?  I see that it's not just the rowid column:

sqlite> select rowid from foo;
1

I was trying create a table with only one column, rowid.  This is the intended behavior:

sqlite> drop table foo;
sqlite> create table foo(rowid integer primary key);
sqlite> insert into foo values (100);
sqlite> select rowid from foo;
100
sqlite> select * from foo;
100

Update: After further testing I discovered that the first example made a column called `integer`.