现有 dept表有字段code,code的数据结构是H.+序号(9位数字)用户输入的参数:序号为p_num select t.* from dept t where substr(t.code,3)=
时间:2018-07-11
现有 dept表有字段code,code的数据结构是H.+序号(9位数字)用户输入的参数:序号为p_num select t.* from dept t where substr(t.code,3)= p_num; 上面的SQL语句写法是否合理,如不合理请写你优化上面的语句?