title: how to return value from key/value dict using SQL from a table that stores keys?
body: <p>I have a table where I store ids of some resources. I want to make sql return values for a keyvalue dictionary without post processing and without a JOIN.</p>
  
  <p>This would be possible using a JOIN. Is there other way to do it, as I only have a few elements in the key/value array.</p>
  
  <p>Programming language is not important. I'm only looking for the SQL that would be able to do it. Postgresql or Mysql.</p>
  
  <p>For the table:</p>
  
  <pre><code>|objectId|attribute1|attribute2|
  |45      | x        | y        |
  |67      | x1       | y2       |
  ...
  </code></pre>
  
  <p>and I have a dict (object/dict/key value array):</p>
  
  <pre><code>{ 45: "My title", 67: "Other title" }
  </code></pre>
  
  <p>And sql result should contain titles instead of values for objectId.</p>
  
  <pre><code>select objectId, attribute1 
  from table
  </code></pre>
  
  <p>would return:</p>
  
  <pre><code>My title | x
  Other title | x1
  </code></pre>