Search Postgresql Archives

Re: A couple of newbie questions ...

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

 



Craig Ringer wrote:

INSERT INTO table (fld_y,fld_z) VALUES ('y','z')

which is really doing:

INSERT INTO table (fld_x, fld_y,fld_z) VALUES (DEFAULT, 'y','z')


To be honest I hadn't seen the use of INSERT INTO table (fld_x, fld_y,fld_z) VALUES (DEFAULT, 'y','z') before, I have always gone with INSERT INTO table (fld_x, fld_y,fld_z) VALUES (NULL, 'y','z')

is DEFAULT a better option than using NULL? or is it just a preference to spell out the implied default entry?

I've only used DEFAULT in CREATE TABLE(...)


--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux