I am running into an issue with SQLite that I think might be a bug. When I
run the PRAGMA table_info
<http://t.signauxcinq.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XZsRzDgTW5vwkZs8pTgPFVRbxS056dNRVf9jsl6n02?t=https%3A%2F%2Fwww.sqlite.org%2Fpragma.html%23pragma_table_info&si=5896992917028864&pi=edf25f00-c978-4b44-96cc-867a8bd93485>
command
on a view that uses an aggregate function, the data type always comes up
empty.

To duplicate the issue, create a new SQLite 3 database and add a table. Add
at least one field in the table and make sure its a numeric field (such as
integer or float or something). Then create a new view with a SELECT statement
similar to the following:

SELECT *, Sum(MyField) AS MySumField FROM MyTable

Now run sqlite3 <database_name> and type the following:

PRAGMA table_info(MyView);

You will notice there is no data type for some reason. Here is my output
when I issued the command:

0|Field1|INTEGER|0||01|Field2|INTEGER|0||02|Field3|FLOAT|0||03|SumField2||0||0

Reply via email to