代码中常见的魔法数字处理方式是定义常量 枚举,那么 sql 中呢?
select * from table where type = '1' const web = 1 const app =2 select * from table where type = '+web+' select * from table where locate('+web+',type)>0 or locate('+app+',type)>0