select column by position
am 24.09.2004 13:50:36 von jleeThis is a multi-part message in MIME format.
----=_NextPart_ST_12_50_37_Friday_September_24_2004_6647
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Is there a way to select a column in a table by its position rather than
the field name? If I understand correctly column position in a table is
fixed. I've not been able to find anything in the archives or docs to
indicate that it's possible to select by position.
=20
For example:
=20
CREATE TABLE Accessions (
accession_id INT8 PRIMARY KEY DEFAULT nextval('accession_id_seq'),
accenumb VARCHAR(255) NOT NULL,
instcode_id INT4 NOT NULL CONSTRAINT Accessions_instcode_id_fk
REFERENCES Institutions(institution_id),
accename VARCHAR(255)
);
=20
I would like to select accession_id by indicating column 1 somehow. Is
this at all possible?
=20
Cheers,
Jennifer
=20
************************************************************ *****
DISCLAIMER:
This email is from the Scottish Crop Research Institute, but the views expr=
essed by the sender are not necessarily the views of SCRI and its subsidiar=
ies. This email and any files transmitted with it are confidential to the =
intended recipient at the e-mail address to which it has been addressed. I=
t may not be disclosed or used by any other than that addressee.
If you are not the intended recipient you are requested to preserve this co=
nfidentiality and you must not use, disclose, copy, print or rely on this e=
-mail in any way. Please notify mail@scri.sari.ac.uk quoting the name of th=
e sender and delete the email from your system.
Although SCRI has taken reasonable precautions to ensure no viruses are pre=
sent in this email, neither the Institute nor the sender accepts any respon=
sibility for any viruses, and it is your responsibility to scan the email a=
nd the attachments (if any).
----=_NextPart_ST_12_50_37_Friday_September_24_2004_6647
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
0.0pt;
font-family:Arial'>Is there a way to select a column in a table by its posi=
tion
rather than the field name? If I understand correctly column position in a
table is fixed. I’ve not been able to find anything in the archives or
docs to indicate that it’s possible to select by position.
0.0pt;
font-family:Arial'>
0.0pt;
font-family:Arial'>For example:
0.0pt;
font-family:Arial'>
0.0pt;
font-family:Arial'>CREATE TABLE Accessions (
0.0pt;
font-family:Arial'>
accession_id INT8 PRIMARY KEY DEFAULT nextval('accession_id_seq'),
0.0pt;
font-family:Arial'>
accenumb VARCHAR(255) NOT NULL,
0.0pt;
font-family:Arial'>
instcode_id INT4 NOT NULL CONSTRAINT Accessions_instcode_id_fk
REFERENCES Institutions(institution_id),
0.0pt;
font-family:Arial'>
accename VARCHAR(255)
0.0pt;
font-family:Arial'>);
0.0pt;
font-family:Arial'>
0.0pt;
font-family:Arial'>I would like to select accession_id by indicating column=
1
somehow. Is this at all possible?
0.0pt;
font-family:Arial'>
0.0pt;
font-family:Arial'>Cheers,
0.0pt;
font-family:Arial'>Jennifer
0.0pt;
font-family:Arial'>
ize=3D2>**************************************************** ***************=
**********************
ize=3D2>DISCLAIMER:
ize=3D2>This email is from the Scottish Crop Research Institute, but the vi=
ews expressed by the sender are not necessarily the views of SCRI and its s=
ubsidiaries. This email and any files transmitted with it are confide=
ntial to the intended recipient at the e-mail address to which it has been =
addressed. It may not be disclosed or used by any other than that add=
ressee.
If you are not the intended recipient you are requested to prese=
rve this confidentiality and you must not use, disclose, copy, print or rel=
y on this e-mail in any way. Please notify
..ac.uk">mail@scri.sari.ac.uk quoting the name of the sender and delete =
the email from your system.
ize=3D2>Although SCRI has taken reasonable precautions to ensure no viruses=
are present in this email, neither the Institute nor the sender accepts an=
y responsibility for any viruses, and it is your responsibility to scan the=
email and the attachments (if any).
----=_NextPart_ST_12_50_37_Friday_September_24_2004_6647--