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

column number instead of column name

From: First Last <y2kdis(at)atenista(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: column number instead of column name
Date: 2006-01-20 08:24:37
Message-ID: 20060120002437.E662DAB0@dm20.mta.everyone.net (view raw or flat)
Thread:
Lists: pgsql-novice
how can i make use of the column number instead of the column name when making the select statement?

for instance:
"SELECT mytable.col[1], mytable.col[2], mytable.col[3], mytable.userid from mytable"

i have several tables and i need to extract the first three columns and a known column. the first three columns for the different tables vary, but all the tables have the userid column.


_____________________________________________________________
Check out Atenista.Net (www.atenista.net)- new design, regular content and additional services!

Responses

pgsql-novice by date

Next:From: Michael FuhrDate: 2006-01-21 05:22:46
Subject: Re: column number instead of column name
Previous:From: Lynna LandstreetDate: 2006-01-20 07:36:27
Subject: Re: Problems with select statement

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