Mybatis IFNULL函数用法
实例:
SELECT IFNULL
假设:select * from user where userId=1有返回结果那么直接返回子查询结果
((select * from user where userId=1), "RUNOOB");
假设:select * from user where userId=1没有返回结果那么返回 'RUNOOB'
((select * from user where userId=1), "RUNOOB");
Mybatis IFNULL函数用法
实例:
SELECT IFNULL
假设:select * from user where userId=1有返回结果那么直接返回子查询结果
((select * from user where userId=1), "RUNOOB");
假设:select * from user where userId=1没有返回结果那么返回 'RUNOOB'
((select * from user where userId=1), "RUNOOB");