dbTalk Databases Forums  

How to re-order fields in table?

comp.databases.postgresql comp.databases.postgresql


Discuss How to re-order fields in table? in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dariusz Pelka
 
Posts: n/a

Default How to re-order fields in table? - 03-27-2008 , 04:34 AM






Hi,


How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?

Thanks,

Darek

Reply With Quote
  #2  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM






On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #3  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #4  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #5  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #6  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #7  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #8  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #9  
Old   
Holgi
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:28 AM



On 27 Mrz., 11:34, Dariusz Pelka <dariusz-pe... (AT) go2 (DOT) pl> wrote:
Quote:
How can I change columns order in an existing table? I went through PG
manual, also asked google but could not find answer, anyone knows?
Why would you want to do that? You can change the "order" of the
columns in a select-statement...?


Reply With Quote
  #10  
Old   
Jon
 
Posts: n/a

Default Re: How to re-order fields in table? - 03-27-2008 , 05:36 AM



"Dariusz Pelka" <dariusz-pelka (AT) go2 (DOT) pl> wrote
in message news:fsft9b$1lt$1 (AT) news (DOT) onet.pl...
Quote:
How can I change columns order in an existing table?
Why?

This question comes up fairly frequently and is amusing in
its naiveté. %^)

Just use SELECT A,B,C ... instead of SELECT * ...

What presentation tool are you using that cannot simply display
the columns in whatever order you desire?

If you must attach value to the default column ordering, consider
ALTER TABLE RENAME, CREATE TABLE, SELECT INTO,...
or even just CREATE VIEW.

Quote:
I went through PG manual, also asked google but could not
find answer, anyone knows?
Apparently so.

Google: "change database column order"

Jon




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.