delimiter $$
create procedure proc_add_book(in $bookName varchar(200),in $price float)
begin
declare $existsFlag int default 0;
select bookId into $existsFlag from book where bookName = $bookName limit 1;
if bookId > 0 then
#if not exists (select * from book where bookNumber = $bookName) then
insert into book(bookNumber,price) values($bookName,$price);
end if;
end$$
delimiter ;