KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a query: SELECT bar, (SELECT name FROM names WHERE value = bar) as name FROM foobar WHERE foo = 1 and bar = ANY (1,2,3) My problem is, when there is no row containing bar = 3 (or whatever other value is requested) in table foobar , no rows are returned for that value of bar. I'd like my query to return a row of [bar, NULL] instead, but can't think up a way to approach this. Is this even possible?
Tags (comma-separated)
Save Edits
Cancel