-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert Citek wrote: > Since bar is the second field in the table, I was wondering if I can > select fields using the numerical position: > > select 2 from foobar;
you've already got good answers for this from others but let me give you a real world example. we have added columns in the accounting app as part of upgrades. postgres adds the column to the end of the list when using alter table add column foo; But for asthetic reasons we place the column where it fits best in a new installation. So people who upgrade have a different column ordering than those who have a new installation. So column 2 may be different for different people. - -- JT Morée PC Xperience, Inc. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEYpKBucZ4lMT2d5IRAl/8AKCRaZQnzzhSg53MRpSswH4CTRW+2gCgiK9D ybwjtvnr0IdBQMA0Puz5Lw0= =FdeM -----END PGP SIGNATURE----- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
