PostgreSQL基本函数
来源:互联网 发布:type-c知乎 编辑:程序博客网 时间:2024/06/05 10:52
PostgreSQL函数
str . search( regex )匹配str LIKE '%' || sub || '%'
str SIMILAR TO pattern
str ~ regexstr . contains( sub )
str . matches( regex )
Pattern.matches( regex, str )str . match( regex )抽出 (位置)substring( str from pos for len )
substr( str, pos, len )str . substring( pos, pos + len )str . substring( pos, pos + len )
str . substr( pos, len )抽出 (左右)left( str, len ) -- 9.1
right( str, len ) -- 9.1str . substring( 0, len )
str . substring( str.length() - len )str . substring( 0, len )
str . substring( str.length - len )抽出 (正则表达式)substring( src from regex )
regexp_matches( src, regex )Pattern.compile( regex ).matcher( str ).group( n )str . match( regex )替换 (位置)overlay( str placing rep from pos for len )StringUtils.overlay( str, rep, start, end )N/A替换 (正则表达式)regexp_replace( str, regex, rep, 'g' )
translate( str, from, to )str . replaceAll( regex, rep )
Pattern.compile( regex ).matcher( str ).replaceAll( rep )str . replace( regex, rep )连接str1 || str2
concat( str1, str2, ... ) -- 9.1
concat_ws( sep, str1, str2, ... ) -- 9.1str1 + str2
str1 . concat( str2 )同左结合array_to_string( array, sep )
string_agg( setof_str, sep ) -- 9.0StringUtils.join( array, sep )array . join( sep )分割string_to_array( str, sep )
regexp_split_to_array( str, regex, 'g' )
regexp_split_to_table( str, regex, 'g' )str . split( regex )
Pattern.compile( regex ).split( str )str . split( regex )trimtrim([leading|trailing|both] trimmed fromstr)
ltrim( str, trimmed )
rtrim( str, trimmed )str . trim()str . replace(/^\s+|\s+$/g, "")重复repeat( str, n )StringUtils.repeat( str, n )N/A转成小写字母lower( str )str . toLowerCase()同左转成大写字母upper( str )str . toUpperCase()同左反转reverse( str ) -- 9.1StringUtils.reverse( str )N/A格式化format( format, arg1, ... ) -- 9.1String.format( format, arg1, ... )N/A
0 0
- PostgreSQL基本函数
- 【PostgresQL】PostgresQL 基本操作
- postgresql 函数
- postgreSQL函数
- PostgreSQL-函数
- postgresql函数
- Postgresql 函数
- PostgreSQL基本命令
- PostgreSQL基本操作
- PostgresQL基本使用
- PostgreSQL 基本语法小结
- PostgreSQL基本命令
- postgresql基本操作
- postgresql基本语法
- postgreSQL 基本语法记录
- Postgresql的基本操作
- PostgreSQL数据库基本配置
- kail PostgreSQL基本操作
- poj 2864
- FragmentPagerAdapter无法刷新的最简单解决办法
- 基于Servlet实现的微博的点滴记录(1)
- Android仿虾米音乐播放器之本地音乐获取
- 郑州俊风网络科技有限公司
- PostgreSQL基本函数
- 如何得到yum的rpm包
- 修饰器
- App布局初探之简单模型
- Mysql中表操作删除表、清空表(主键从0开始、不从0开始的清空)
- TreeView 精确查找
- 分析ReentrantLock之unlock
- 配置Tomcat虚拟目录和主机,通过主机名来访问项目
- 浅谈Python Web的五大框架