Re: [GENERAL] a basic sql request - Mailing list pgsql-general

From Bob Kline
Subject Re: [GENERAL] a basic sql request
Date
Msg-id Pine.LNX.4.10.9911080749050.13782-100000@rksystems.com
Whole thread Raw
In response to a basic sql request  (Edouard DESSIOUX <edx@intrinsec.com>)
List pgsql-general
On Mon, 8 Nov 1999, Edouard DESSIOUX wrote:

> Hello,
>
> I'm having problem with a request, I want to do a
> select * from crypto
> but I want the first field to be the name field.
> So i tried
> select name,* from crypto
> but I just got name both.
> Can someone tell me how to do this ?
>

The use of * in a SELECT statement requests all columns from the
table(s) in the FROM clause.  If you want control over which columns are
returned or the order in which they are returned or the name used to
label the column in the output, you must provide an explicit column
list.  This is a *very* basic SQL concept, and you should probably spend
some time with a good book on SQL or with the online tutorial
(http://www.postgresql.org/docs/tutorial/sql-language.htm#SELECT covers
your question nicely).

Hope this helps.

--
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com


pgsql-general by date:

Previous
From: Edouard DESSIOUX
Date:
Subject: a basic sql request
Next
From: Fabrice Scemama
Date:
Subject: Postgres on Linux Alpha