[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] INSERT/UPDATE generated columns?
From:       "Keith Medcalf" <kmedcalf () dessus ! com>
Date:       2019-10-30 4:04:21
Message-ID: 048cc4ff6db7e14d9f088a48ff5d28b8 () mail ! dessus ! com
[Download RAW message or body]


On Tuesday, 29 October, 2019 20:48, nomad@null.net wrote:

> The gencol.html document does not describe the result of attempting to
> INSERT INTO or UPDATE a generated column. Does this raise an error (my
> preference) or is it simply ignored? Could the behaviour be added to
> the documentation?

sqlite> create table t(data, updated as (current_timestamp) stored);
sqlite> insert into t (data, updated) values (1,45);
Error: cannot INSERT into generated column "updated"
sqlite> insert into t (data) values (1);
sqlite> update t set updated=4;
Error: cannot UPDATE generated column "updated"

It thows an error during the prepare ...

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot \
about anticipated traffic volume.




_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic