在mysql存储过程里面,我用:  set max_search_id = select last_insert_id()
但貌似语法有问题,last_insert_id()是mysql内置方法,返回上次插入的id。如果想实现类似的东东,应该怎么写呢