Differences between revisions 6 and 7
Revision 6 as of 2013-10-18 14:31:32
Size: 1635
Editor: HyunsikChoi
Comment: Add char_length function
Revision 7 as of 2014-03-06 04:52:30
Size: 0
Editor: HyunsikChoi
Comment: moved to new doc.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= SQL Standard Functions =

== String Operator and Functions ==
||function definition||return type||description||example||result||
||''string'' || ''string''||text||string concatenate|| 'Ta' || 'jo'||Tajo||
||char_length(''string'' text) or character_length(''string'' text)||int||Number of characters in string||char_length('Tajo')||4||
||trim([leading | trailing | both] ''[characters]'' from ''string'')||text||Remove the characters (a space by default) from the start/end/both ends of the string|| trim(both 'x' from 'xTajoxx') ||Tajo||
||btrim(''string'' text [, ''characters'' text])||text||Remove the characters (a space by default) from the both ends of the string|| trim('xTajoxx', 'x') ||Tajo||
||ltrim(''string'' text [, ''characters'' text])||text||Remove the characters (a space by default) from the start ends of the string|| ltrim('xxTajo', 'x') ||Tajo||
||rtrim(''string'' text [, ''characters'' text])||text||Remove the characters (a space by default) from the end ends of the string|| rtrim('Tajoxx', 'x') ||Tajo||
||split_part(''string'' text, ''delimiter'' text, ''field'' int)||text||Split a string on delimiter and return the given field (counting from one)||split_part('ab_bc_cd','_',2)||bc||
||regexp_replace(''string'' text, ''pattern'' text, ''replacement'' text)||text||Replace substrings matched to a given regular expression pattern||regexp_replace('abcdef', '(^ab|ef$)', '--')||--cd--||
||upper(''string'' text)||text||makes an input text to be upper case||upper('tajo')||TAJO||
||lower(''string'' text)||text||makes an input text to be lower case||lower('TAJO')||tajo||