如果我设法使如下因素视图在MySQL我可以在查询中的许多位置使用列别名吗?
select id,name,score,total,CALCIT(total - score) as x,(CALCIT(total - score)/total) as per from tblx;
过程CALCIT(总 - 分)被计算值的两倍
如何做一些事情是这样的:
select id,name,score,total,CALCIT(total - score) as `x`,`x`/total as per from tblx;
其中CALCIT是一个函数