1.创建带有参的函数
create function newdate() return varchar(20) return date_format(curdate(),'%Y年%m月%d日') select newdate(); --创建带有参的函数 create function show_name_store(bid int) return varchar(50) return (select concat_ws('----',book_name,store) from bookinfo where book_id=bid) select show_name_store(2015); --删除函数 drop function newdate; drop function if exists newdate