Search Postgresql Archives

Re: timestamp default current_timestamp not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, December 14, 2021, Sanjay Minni <sanjay.minni@xxxxxxxxx> wrote:
Its an insert and my insert SQL contains the column timestamp and value nil. 
Will it work if the SQL contains timestamp through value is nil


If you explicitly specify NULL for the value of the column then there is no need for the system to produce a default, and thus you will see NULL when you query that record.

You can say “DEFAULT” (no quotes) though if you need to have the column name in the Insert statement but still want the default to be used.

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux