a basic sql request

Поиск
Список
Период
Сортировка
Искать

a basic sql request

От:
Edouard DESSIOUX <edx@intrinsec.com>
Дата:
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 ?
-- 
Edouard DESSIOUX
Proverbe chien :
"Si ca se mange pas,
 Si ca se baise pas,
 Pisse dessus !!"

Re: [GENERAL] a basic sql request

От:
Bob Kline <bkline@rksystems.com>
Дата:
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

FAQ