Sql functions: Difference between revisions

From wikinotes
(Created page with "= Text Functions = <blockquote> == CONCAT == <blockquote> CONCAT lets you combine columns into one <syntaxhighlight lang="MySQL"> SELECT CONCAT(first_name, " ", last_name) AS...")
 
(No difference)

Latest revision as of 18:25, 19 September 2021

Text Functions

CONCAT

CONCAT lets you combine columns into one

SELECT CONCAT(first_name, " ", last_name) AS fullname FROM users;

SUBSTRING_INDEX

SUBSTRING_INDEX lets you split/tokenize a string

SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2)
##> www.mysql

Number Functions