title: Creating a validation in PL/SQL
body: <p>How to validate an order? It can only be validated if the order (table orders) isn't bigger than the quantity already in stock (table products). They are in 2 separate tables, as mentioned between paranthesis. This is what I could think of.</p>
  
  <pre><code>declare prod number;  order number;
  begin
  select qty into prod from products;
  end;
  
  begin
  select qty into order from orders;
  end;
  if order &lt;= prod then 
   return true;
  else
   return false;
  end if;
  </code></pre>