select type,price from gree where price between 3000 and 5000;
想定义一个自定义函数,用变量x,y代替3000,5000。但是这么写的话编译会报错,想请问下正确的应该怎么代替?
收起
可以写成这样的
create function myfun_getMax(num1 int, num2 int) returns int begin declare res int; select type,price from gree where price between num1 and num2 ; return res; end;
报告相同问题?