Re: deleting an identical record

Поиск
Список
Период
Сортировка
От missive@frontiernet.net (Lee Harr)
Тема Re: deleting an identical record
Дата
Msg-id slrna7b8rm.9p.missive@whave.frontiernet.net
обсуждение исходный текст
Ответ на Re: deleting an identical record  (missive@frontiernet.net (Lee Harr))
Список pgsql-general
>> create table t (a int, b text);
>>
>> insert into t values (1, 'a');
>> insert into t values (1, 'a');
>> insert into t values (1, 'a');
>> insert into t values (1, 'a');
>>
>> select oid, * from t;
>
> thanks, this works indeed, what's the meaning of the comma behind oid?
>


select
 a,
 b,
 sqrt(a::numeric),
 'a: '||a::text||' B: '||b::text as myfield
from
 t;


SELECT chooses fields from a table. When you select *, you choose all
fields (except for oid...). You can choose functions and operate
on fields too.

The ::type notation is to coerce the value in to the right type
for the particular function or operator.

So. The comma means "these are separate items in a list of fields."



В списке pgsql-general по дате отправления:

Предыдущее
От: missive@frontiernet.net (Lee Harr)
Дата:
Сообщение: Re: Createdb problems
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PL/pgSQL Memory Management?