SQLite Forum

Question regarding dangling commas in CREATE VIRTUAL TABLE queries
Login
It is not a dangling comma.  The examples you show all merely have the
last parameter equal to an empty string.  For both FTS4, FTS5, and RTREE, this
results in a column named by an empty string ("").

If you are writing your own virtual tables and want to disallow this, just
check the parameters and raise an error if any of them are empty.  Perhaps
we should have done this when we created FTS4, FTS5, and RTREE.  But the time
for that decision has passed.  Those virtual tables have accepted and allowed
column names that are the empty string for many years, and so we cannot change
it now without breaking compatibility.

SQLite also allows you to create tables and columns named by an empty string.
For example:

> ~~~~
CREATE TABLE ""(a INT, "" INT, c INT);
INSERT INTO "" VALUES(1,2,3);
SELECT "" FROM "" WHERE a=1;
~~~~

You are allowed to do this, but you probably ought not.