Updating into string functions


15-Jul-2019 16:29

updating into string functions-7

Haliwa saponi slut

Quotes a string to produce a result that can be used as a properly escaped data value in an SQL statement.

ASCII() works for characters with numeric values from 0 to 255.characters) consisting of the strings that have the corresponding bit in bits set. SELECT MAKE_SET(1,'a','b','c'); --------------------------------------------------------- | MAKE_SET(1,'a','b','c') | --------------------------------------------------------- | a | --------------------------------------------------------- 1 row in set (0.00 sec) MID(str,pos,len) is a synonym for SUBSTRING(str,pos,len). SELECT OCT(12); --------------------------------------------------------- | OCT(12) | --------------------------------------------------------- | 14 | --------------------------------------------------------- 1 row in set (0.00 sec) OCTET_LENGTH() is a synonym for LENGTH().str1 corresponds to bit 0, str2 to bit 1, and so on. Returns a string representation of the octal value of N, where N is a longlong (BIGINT) number. If the leftmost character of the string str is a multi-byte character, returns the code for that character, calculated from the numeric values of its constituent bytes using this formula − SELECT ORD('2'); --------------------------------------------------------- | ORD('2') | --------------------------------------------------------- | 50 | --------------------------------------------------------- 1 row in set (0.00 sec) POSITION(substr IN str) is a synonym for LOCATE(substr,str).Returns 1 if expr matches pat; otherwise it returns 0. REGEXP is not case sensitive, except when used with binary strings.

updating into string functions-42

pros and cons of dating a divorcee

SELECT 'ABCDEF' REGEXP 'A%C%%'; --------------------------------------------------------- | 'ABCDEF' REGEXP 'A%C%%' | --------------------------------------------------------- | 0 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT 'ABCDE' REGEXP '.*'; --------------------------------------------------------- | 'ABCDE' REGEXP '.*' | --------------------------------------------------------- | 1 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT 'new*\n*line' REGEXP 'new\*.\*line'; --------------------------------------------------------- | 'new*\n*line' REGEXP 'new\*.\*line' | --------------------------------------------------------- | 1 | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT REPEAT('My SQL', 3); --------------------------------------------------------- | REPEAT('My SQL', 3) | --------------------------------------------------------- | My SQLMy SQLMy SQL | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT REPLACE(' 'w', 'Ww'); --------------------------------------------------------- | REPLACE(' 'w', 'Ww') | --------------------------------------------------------- | Ww Ww Ww.| --------------------------------------------------------- 1 row in set (0.00 sec) SELECT REVERSE('abcd'); --------------------------------------------------------- | REVERSE('abcd') | --------------------------------------------------------- | dcba | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT RIGHT('foobarbar', 4); --------------------------------------------------------- | RIGHT('foobarbar', 4) | --------------------------------------------------------- | rbar | --------------------------------------------------------- 1 row in set (0.00 sec) SELECT RPAD('hi',5,'?The first argument is the separator for the rest of the arguments.