How to execute query with empty fields?
Posted
by
Kliver Max
on Stack Overflow
See other posts from Stack Overflow
or by Kliver Max
Published on 2012-12-14T10:53:42Z
Indexed on
2012/12/14
11:04 UTC
Read the original article
Hit count: 133
sql
|postgresql
I have a SQL Query:
SELECT documents.*, t_rights.rights, documents_list.docs
FROM documents
INNER JOIN t_rights on t_rights.num=documents.type_right
INNER JOIN documents_list on documents_list.num=documents.document1
WHERE code_document=1 or code_document=1
In case if i have fields documents.document1
and documents.document1
with some value all works fine. But if this field empty i get empty query result.
Its possible make query like this with empty fields?
© Stack Overflow or respective owner