Re: [GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Miloslav Semler
Thank you very much. You have been right. Adding tramecky_id IS NOT NULL solved the problem. Cheers, Miloslav Dne 22.9.2017 v 09:32 Albe Laurenz napsal(a): Miloslav Semler wrote: I found strange behavior with subselects and I am not able to explain it. I have several tables in schema:

[GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Miloslav Semler
Hello, I found strange behavior with subselects and I am not able to explain it. I have several tables in schema: tramecky, mt_hodnoty, plata_kusy in these tables, id is always primary key (serial), table_id is always foreign key to table. When I run this query: select tramecky.id FROM

Re: [GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Albe Laurenz
Miloslav Semler wrote: > I found strange behavior with subselects and I am not able to explain > it. I have several tables in schema: > > tramecky, mt_hodnoty, plata_kusy > > in these tables, id is always primary key (serial), table_id is always > foreign key to table. When I run this query: >

[GENERAL] Question about SELECT statements with subselects

2017-09-22 Thread Miloslav Semler
Hello, I found strange behavior with subselects and I am not able to explain it. I have several tables in schema: tramecky, mt_hodnoty, plata_kusy in these tables, id is always primary key (serial), table_id is always foreign key to table. When I run this query: select tramecky.id FROM