title: PL/SQL: Selecting multiple variables in a single query
body: <p>In the initialization section of an oracle package I try to determine the current ID of certain objects with a given name. <strong>Reason:</strong> The package is used on multiple databases and the IDs of these objects my vary while their names are constant.</p>
  
  <p>The code looks like this:</p>
  
  <pre><code>SELECT id INTO varCat FROM myTable WHERE Type = 'Object' AND Name = 'Cat';
  SELECT id INTO varDog FROM myTable WHERE Type = 'Object' AND Name = 'Dog';
  ...
  SELECT id INTO varMouse FROM myTable WHERE Type = 'Object' AND Name = 'Mouse';
  </code></pre>
  
  <p>Is there a way to optimize the queries and perhaps do it in a single query? </p>