zoukankan      html  css  js  c++  java
  • Mysql3

    使用数据处理函数:

    /*Upper返回大写*/
    select vend_name,Upper(vend_name) as vend_name_upcase
    from vendors
    order by vend_name;

    常用文本处理函数:

    Left()  返回左边的字符;

    Length() 返回串的长度;

    Locate() 找出串的一个子串;

    Lower() 转成小写;

    LTrim() 去掉串左边的空格;

    Right() 返回串右边的字符;

    RTrim() 去掉串右边的空格;

    Soundex() 返回串的soundex值;

    SubString() 返回子串的字符;

    Upper() 转成大写;

    /*soundex是一个将任何文本串转换为描述其语音表示的字母数字模式算法*/
    
    select cust_name,cust_contact
    from customers
    where cust_contact='Y.lie';
    /*如果查找Y.lee,无返回结果*/
    
    select cust_name,cust_contact
    from customers
    where Soundex(cust_contact)=Soundex('Y.lie');
    /*可以得到结果,因为Lee和Lie读音相似*/

    聚集函数:

    对某列数据的处理:

    AVG() 

    COUNT() 行数;

    MAX() 

    MIN() 

    SUM() 

  • 相关阅读:
    DRF
    DRF
    DRF
    DRF
    DRF
    DRF
    DRF
    Mongo错误记录:MongoClient opened before fork. Create MongoClient
    Hive默认分隔符和默认NULL值
    hdfs文件格式比较
  • 原文地址:https://www.cnblogs.com/bersaty/p/3278675.html
Copyright © 2011-2022 走看看