SQLite Forum

A question about the "type" field in the result of PRAGMA table_xinfo for the generated column.
Login
I am going to reform your example and reframe your question because the issue can be brought out more clearly that way and some confounding composition errors are removed. (And, the answer to my question will answer yours.)

If a table is created thusly:

```
CREATE TABLE Test (
    a INTEGER,
    gann INTEGER GENERATED ALWAYS AS (a) NOT NULL,
    nnga INTEGER NOT NULL GENERATED ALWAYS AS (a)
);
```

, then, after <code>.mode list</code>, <code>PRAGMA table_xinfo(Test);</code> produces this output:

```
cid|name|type|notnull|dflt_value|pk|hidden
0|a|INTEGER|0||0|0
1|gann|INTEGER GENERATED ALWAYS|1||0|2
2|nnga|INTEGER|1||0|2
```

Why, when columns gann and nnga have **identical column constraints**, merely specified in a different order, do their table\_xinfo fields differ in the 'type' column?