Select distinct(LAC_CI) from (Select LAC_CI from `dtdb_sh_test`.dt_measurment where callid='04021002ms31310379260576' union Select LAC_CI from `dtdb_sh_test`.dt_measurment where callid='04021002ms31310379260576')html
在执行稍微复杂查询的时候,post
MySQL有时会遇到以下报错状况:google
Error Code : 1248
Every derived table must have its own aliashtm
解决方法:blog
在执行复杂查询处为你的表任意起个别名就能够了。it
Select distinct(LAC_CI) from (Select LAC_CI from `dtdb_sh_test`.dt_measurment t where t.callid='04021002ms31310379260576' union Select LAC_CI from `dtdb_sh_test`.dt_measurment d where d.callid='04021002ms31310379260576') as tio
此处 as t 虽然无任何做用和意义,可是SQL语句是万万少不得的。table