Hi,

according to my experience, sqlite3_get_table() does not return a row
containing the column names and sets numcols to zero if a query
returns zero rows. This is in contrast to other database engines like
MySQL, PostgreSQL, and Oracle which return the column information even
if there are no rows in the result set. Is this a deliberate design
decision? Would there be a way to change it?

libdbi (http://libdbi.sourceforge.net) is a database abstraction layer
for C which supports a variety of database engines including
SQLite. One of our users recently noticed the inconsistency between
database engines. He tried to use this query:

SELECT * FROM table WHERE 0=1

to test for the existence of a particular table and to retrieve its
column information at the same time if it does exist. This may be a
bit of a shortcut but I thought I'd ask to see whether SQLite
deliberately suppresses the column information, or whether simply no
one saw this as a limitation yet.

regards,
Markus

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to