Skip site navigation (1) Skip section navigation (2)

Re: Position of a field

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Position of a field
Date: 2007-02-27 13:08:17
Message-ID: 20070227130817.GF14945@a-kretschmer.de (view raw or flat)
Thread:
Lists: pgadmin-supportpgsql-sql
am  Tue, dem 27.02.2007, um  9:48:57 -0300 mailte Ezequias Rodrigues da Rocha folgendes:
> I understant you inquiry but I don't meant to add all the fields order
> in an insert statement.
> 
> IE:
> insert into table values (value1, value2, value3....)
> 
> is better than
> 
> insert into table (column1,column2,column3 ...) values (value1,
> value2, value3....)

No, it isn't better, because, if you change the table in the future and
add new colums, your insert-statement will be failed. If you write your
insert with explicit column order, nothing happens, except the new row
will be empty.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

In response to

pgadmin-support by date

Next:From: Raymond O'DonnellDate: 2007-02-27 22:48:25
Subject: Re: Slony scripts
Previous:From: Ezequias Rodrigues da RochaDate: 2007-02-27 12:48:57
Subject: Re: Position of a field

pgsql-sql by date

Next:From: Steve MidgleyDate: 2007-02-27 16:38:56
Subject: Re: Change the Default Database
Previous:From: Ezequias Rodrigues da RochaDate: 2007-02-27 12:48:57
Subject: Re: Position of a field

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group