zoukankan      html  css  js  c++  java
  • 三种数据库截取字段内容&&获取字符长度的函数如下

            if(databaseutil.getValue("database").equalsIgnoreCase("sqlserver")){
            	
           	 list =categoryFLDao.findBySQL("select id,substring(full_name,6,datalength(full_name)-6) from fhcb_08_tbl_category where full_id like '" + cid + "~%'and id!="+cid  );
    	
            }else if(databaseutil.getValue("database").equalsIgnoreCase("mysql")){
            	 list =categoryFLDao.findBySQL("select id,substring(full_name,6,CHAR_LENGTH(full_name)-6) from fhcb_08_tbl_category where full_id like '" + cid + "~%'and id!="+cid  );
            }
            else if(databaseutil.getValue("database").equalsIgnoreCase("oracle")){
           	 list =categoryFLDao.findBySQL("select id,SUBSTR(full_name,6,LENGTH(full_name)-6) from fhcb_08_tbl_category where full_id like '" + cid + "~%'and id!="+cid  );
    
            }
    

      

  • 相关阅读:
    vue 兼容IE报错解决方案
    JDK1.8 ArrayList 源码解析
    Mac nasm 汇编入门
    命令模式
    模板方法
    Mysql Limit 调优
    观察者模式
    外观模式
    Rest- Client
    MongoDB数据库 5分钟快速上手
  • 原文地址:https://www.cnblogs.com/qinyios/p/11281739.html
Copyright © 2011-2022 走看看