title: Error 1172 : Result consisted more than one row (in SQL)
body: <p>I have declared the variables (total,order_num,order_stts,id_cust,reMarks). But it have error that said result consisted of more than one row. How can i fix this error? Please help me fix this error, i'm new to sql.</p>
  
  <p>From this code, there's several task to do:</p>
  
  <pre><code> (1) update tble customer by setting the address to '90 TYT' if c_id= 1 
   (2) view order_no,status,c_id,item_total remarks. 
   (3) if item_total 0, then update table order_status by setting remarks = 'UNAVAILABLE',
           else select order_no,status,item_total,remarks where status = 'waiting'.
  
  
  #drop procedure if exists usp_GetAnything;
  delimiter //
  create procedure usp_GetAnything()
  begin
  
  declare total int default 0;
  declare order_num varchar(45) default 000;
  declare order_stts varchar(45) default 000;
  declare id_cust int default 0;
  declare reMarks varchar (45) default 000;
  
  select c_id,lname,address,city
  from customer;
  update customer
  set address = '90 TYT'
  where c_id = 1;
  
  select o.order_no,o.o_status,c.c_id,o.item_total,o.remarks 
  into  order_num,order_stts,id_cust,total,reMarks
  from customer c, order_status o
  where c.c_id=o.c_id;
  
      if (total &gt; 0) then 
      update order_status o
      set reMarks = 'UNAVAILABLE'
      where order_num &gt; '123';
      else  
      select order_num,order_stts,total,reMarks
      from order_status
      where order_stts = 'waiting';
  
  end if;
  
  end
  </code></pre>