url_extract_host
Descriptionβ
Extracts the host section from a URL.
Syntaxβ
VARCHAR url_extract_host(VARCHAR str)
Parametersβ
str
: the string to extract its host string. Ifstr
is not a string, this function will try implicit cast first.
Return valueβ
Returns the host string.
Examplesβ
mysql> select url_extract_host('httpa://starrocks.com/test/api/v1');
+-------------------------------------------------------+
| url_extract_host('httpa://starrocks.com/test/api/v1') |
+-------------------------------------------------------+
| starrocks.com |
+-------------------------------------------------------+