我要执行这段sql语句
SELECT * FROM sys_teacher WHERE T_UID=(SELECT MAX(CAST(T_UID AS SIGNED)) FROM sys_teacher)
在框架中这要写的
SysTeacher sysTeacher2 = dao().fetch(SysTeacher.class, Cnd.where("T_UID", "=", "SELECT MAX(CAST(T_UID AS SIGNED)) FROM sys_teacher"));
这是执行的输出
SELECT * FROM sys_teacher WHERE T_UID='SELECT MAX(CAST(T_UID AS SIGNED)) FROM sys_teacher' LIMIT 0, 1
而这段sql在在MySQL中是错误的一个是(),Nutz的是 ‘ ’,我该如何得到某个字段的最大值?