Q:

plsql Result consisted of more than one row. How to handel it

CREATE PROCEDURE book_check(book_Id varchar(64))
    begin 
    declare book_available varchar(64);

    select book_id into book_available 
    from book_copies 
    where No_of_Copies >0 and book_id=book_Id;

    if(book_Id in book_available ) then
        select concat ("Book available");
    else
        select concat ("Book not available");
    end if;
end
//

what can i write in place of 'in' . I know the syntax i wrong .

A:

It's unclear to me what you are trying to do. I assume you want to find out if a book is available or not and return that information to the caller of the function.
Your declaration of the procedure header and the variables is wrong. 

Procedure or function parameters are not defined with a length for the datatype. 
Inside a procedure or function you don't need declare
you can't have a select statement without putting the result somewhere. * Assigning a constant value to a variable is done using :=
If you want to return information to the caller, use a function, not a procedure
You should not give variables or parameters the same name as a column. A common naming convention in the Oracle world is to give parameters the prefix p_ and local variables the prefix l_ but anything that avoids a name clash between column names and variables is OK - just be consistent.

CREATE function book_check(p_book_id varchar)
   return varchar
as
   l_count integer;
   l_result varchar(20);
begin 
  select count(*)
    into l_count
  from book_copies 
  where No_of_Copies > 0 
    and book_id = p_book_id;

  if l_count > 0 then 
    l_result := 'Book available';
  else
    l_result := "Book not available";
  end if;

  return result;

end;
/

You should really take the time and read the PL/SQL Language reference. All the above is explained there. 

