常用的sql函数

时间:2023-03-08 16:51:10

常用的sql函数

    1. concat('hello','world')  结果:helloworld  作用:拼接
    2. substr('helloworld',1,5)        hello                  截取(前后下标都包括)
    3. substring('helloworld',1,5)       hell                    截取(前包括后不包括)
    4. length('edtrfytg hjpjiuy')         16                     获取字符串长度(包括空格)
    5. instr('helloworld','w')               6                       查找指定字符的下标
    6. replace('tyuu7','u','m')             tymm7               替换指定的字符