Sunday, August 26, 2012

SQL String functions

Some STRING functions in SQL:

select RIGHT(column, chars) from table;
select SUBSTRING_INDEX(column, char, which char (i.e, 1,2...)) from table;
select REVERSE(string);
select LTRIM(string);
select RTRIM(string);
select LENGTH(string);

No comments:

Post a Comment