sql string functions

Solutions on MaxInterview for sql string functions by the best coders in the world

showing results for - "sql string functions"
Nael
25 Aug 2017
1ASCII Returns the equivalent ASCII value for a specific character.
2CHAR_LENGTH Returns the character length of a string.
3CHARACTER_
4LENGTH Same as CHAR_LENGTH.
5CONCAT Adds expressions together, with a minimum of 2.
6CONCAT_WS Adds expressions together, but with a separator between each value.
7FIELD Returns an index value relative to the position of a value within a list of
8values.
9FIND IN SET Returns the position of a string in a list of strings.
10FORMAT When passed a number, returns that number formatted to include
11commas (eg 3,400,000).
12INSERT Allows you to insert one string into another at a certain point, for a
13certain number of characters.
14INSTR Returns the position of the first time one string appears within another.
15LCASE Convert a string to lowercase.
16LEFT Starting from the left, extract the given number of characters from a
17string and return them as another.
18LENGTH Returns the length of a string, but in bytes.
19LOCATE Returns the first occurrence of one string within another,
20LOWER Same as LCASE.
21LPAD Left pads one string with another, to a specific length.
22LTRIM Remove any leading spaces from the given string.
23MID Extracts one string from another, starting from any position.
24POSITION Returns the position of the first time one substring appears within
25another.
26REPEAT Allows you to repeat a string
27REPLACE Allows you to replace any instances of a substring within a string, with
28a new substring.
29REVERSE Reverses the string.
30RIGHT Starting from the right, extract the given number of characters from a
31string and return them as another.
32RPAD Right pads one string with another, to a specific length.
33RTRIM Removes any trailing spaces from the given string.
34SPACE Returns a string full of spaces equal to the amount you pass it.
35STRCMP Compares 2 strings for differences
36SUBSTR Extracts one substring from another, starting from any position.
37SUBSTRING Same as SUBSTR
38SUBSTRING_
39INDEX
40Returns a substring from a string before the passed substring is found
41the number of times equals to the passed number.
42TRIM Removes trailing and leading spaces from the given string. Same as if
43you were to run LTRIM and RTRIM together.
44UCASE Convert a string to uppercase.
45UPPER Same as UCASE