mybatis判断集合为空或者元素个数为零: <if test="mlhs != null and mlhs.size() != 0"> and t.mlh_name not in <foreach collection="mlhs" item="item1" open="(" close=")" index="i" separator=",">
import java.util.ArrayList; import java.util.List; import org.junit.Test; /** * 判断重复的数据 * @author YangKai * */ public class Demo { @Test public void a () { List<Integer> list = new ArrayList<Integer>(); List<Integer> list2 = new ArrayLis
一个字段Remark的数据类型设置先设置为varcharr(255),后来考虑到扩展性需要将其定义为TEXT类型,但是SQL 语句报错. SQL 语句: SELECT * FROM TABLE WHERE ISNULL(Remark,'')<>'' 报错信息:数据类型 text 和 varchar 在 not equal to 运算符中不兼容. 解决办法:使用datalength(字段名)函数 SEL