Re: [GENERAL] a basic sql request

From: Bob Kline <bkline(at)rksystems(dot)com>
To: Edouard DESSIOUX <edx(at)intrinsec(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] a basic sql request
Date: 1999-11-08 12:57:13
Message-ID: Pine.LNX.4.10.9911080749050.13782-100000@rksystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rksystems(dot)com
http://www.rksystems.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabrice Scemama 1999-11-08 14:39:27 Postgres on Linux Alpha
Previous Message Edouard DESSIOUX 1999-11-08 12:42:52 a basic sql request