>> 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."