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: (view raw, whole thread or download thread mbox)
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 ( new design, regular content and additional services!


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-2017 The PostgreSQL Global Development Group