given a simply table table like this:
create table MyTabl
(id serial,
lname varchar,
primary key (id)
)
I am trying to return the Primary-Key for a given
row regardless of the wanted row already being
in the table.
using something like:
select coalesce
(
(select id from MyTabl where lnam
Hi,
I am using postgres 8.4 and I am having problems doing a very simple query:
select zona_id from zonas where zona_id not in (select zona_id from usuarios
where per_id =2)
but I get no records in return.
The problem is that, if I I break down the quey, I get:
select zona_id from zonas
"