title: IF else statement inside select statement in sql
body: <p>how can i insert if else statement into select statement using mysql? Please help me. I'm new here..
  I've tried using delimiter, but they have error..
   For example this statement: </p>
  
  <pre><code>SELECT c_id
    FROM customer
   WHERE city = 'AZ';
  
  SELECT order_no,
         o_status 
    FROM order_status,
         customer
   WHERE order_status.c_id = customer.c_id;
  
  UPDATE order_status 
     SET item_total=0
   WHERE o_status='waiting';
  </code></pre>