StringBuilder hql = new StringBuilder("from Student where 1=1");
执行时相当于
SELECT * from t_student where 1=1 and stu_name LIKE ' %王% ';
正确写法:两边不能有空格
执行时相当于
SELECT * from t_student where 1=1 and stu_name LIKE ' %王% ';
StringBuilder hql = new StringBuilder("from Student where 1=1");
执行时相当于
SELECT * from t_student where 1=1 and stu_name LIKE ' %王% ';
正确写法:两边不能有空格
执行时相当于
SELECT * from t_student where 1=1 and stu_name LIKE ' %王% ';