Oracle
查询库中列名带有thing
的表的信息
select * from user_tab_columns where column_name like 'thing';
将字段str中的数据含有“A”的替换成“B”
update table_name a set a.str = replace(a.str,'A','B');
将输出结果以逗号分隔的字符串展示
select dbms_lob.substr(wm_concat(a.str),4000) str from table_name a;
MyBatis
mapper中,“>“和“<”等需要加上<![CDATA[ ]]>
<select id="id">
select count(*) from user where age <![CDATA[ <= ]]> 10
</select>
或者使用<
替换“<”,使用>
替换“>”。
<select id="id">
select count(*) from user where age <= 10
</select>