例子1:统计一个字符串中“,”的个数: select lengthb(regexp_replace('[a,b,c,d,e,f]','[^,]',null)) as res from dual; 例子2:查询lborganization表中字段fdncode包含1个"."号的所有记录:select * from lborganization a where lengthb(regexp_replace('['||a.fdncode||']','[^.]',null)) =1; 例子3…
public class CountJava{ public static void main(String[] args){ String str = "dnajjavaNISLjavaERBjavafvsbdjavaFALjavaEUIcjavazs"; int count = 0; int index = 0; while(str.indexOf("java") != -1){ index = str.indexOf("java"); st…
今天公司两个远端的数据库主从同步有点问题,查看下wordpress库下所有表的表的条目? mysql> use information_schema;Database changedmysql> select table_name,table_rows from tables where TABLE_SCHEMA = 'wordpress'order by table_rows desc;+-----------------------+------------+| table_name |…