On February 15, 2020 2:14:30 p.m. EST, Thomas Kurz <sqlite.2...@t-net.ruhr> wrote: >Wouldn't be something like > >SELECT sql FROM sqlite_master WHERE tbl_name='?' AND type='table' >contains "WITHOUT ROWID" > >be sufficient? > >Just being curious. > >----- Original Message ----- >From: sky5w...@gmail.com <sky5w...@gmail.com> >To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> >Sent: Saturday, February 15, 2020, 18:06:47 >Subject: [sqlite] WITHOUT ROWID tables > >Ok, not ideal. Still confusing, but I see the difference. >For my code, I know the schemas. I guess a SQL builder could offer up >query >options to the user browsing new databases. > >On Sat, Feb 15, 2020 at 11:26 AM Simon Slavin <slav...@bigfraud.org> >wrote: > >> On 15 Feb 2020, at 3:14pm, sky5w...@gmail.com wrote: > >> >> To determine if table XYZ is a WITHOUT ROWID table, run "PRAGMA >> >> index_info('XYZ');". If you get back one or more rows, then XYZ >is a >> >> WITHOUT ROWID table. If you get back no rows, then XYZ is a rowid >> >> table. >> >> >> > Confused...What if I made an index on a ROWID table? >> > CREATE INDEX "Z" ON "DOC" ("n_id"); > >> The parameter in index_info() is normally the name of an index. So >if you >> create an index "Z" and ask for index_info("Z") you will get >information on >> that index. > >> If you create a WITHOUT ROWID table with name 'Y", and ask for >> index_info("Y") you will get information on the primary key of that >table. > >> If both exist, you get information about the index. > >> Simon >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
CREATE TABLE t( c TEXT DEFAULT 'WITHOUT ROWID' -- this comment mentions something about WITHOUT ROWID ); Contrived, no question, but possible. -- J. King _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users