WRT Jose's original context, and just for my enlightment, what happens with the following:
insert into t (a, b, c, d, e, idate) SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p999'; where p999 does not define a record? Is a new record inserted with values of a,b,c, and e null? > -----Original Message----- > From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> > On Behalf Of Jose Isaias Cabrera > Sent: Friday, November 15, 2019 6:21 AM > To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> > Subject: Re: [sqlite] Adding a record to a table with one value > change > > > Simon Slavin, on Thursday, November 14, 2019 06:48 PM, wrote... > > > > On 14 Nov 2019, at 10:27pm, Jake Thaw, on > > > > > Why not like this? > > > > > > insert into t (a, b, c, d, e, idate) > > > SELECT a, b, c, 'y', e, '2019-02-12' FROM t WHERE a = 'p001' > ORDER BY > > > idate desc limit 1; > > > > Dammit. I thought I had tried this, and received a syntax > error. Now I see that it was because I missed out a comma. > Thanks for the correction. > > That just lets you know that you are a human. ;-) > > > Good illustration of why responses should go to the list rather > than direct to the OP. > > Indeed. > _______________________________________________ > 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