VeloDB Cloud
SQL Manual
Functions
string-functions
parse_url

parse_url

Description

Syntax:

VARCHAR parse_url(VARCHAR url, VARCHAR name)

This function parses the corresponding field to name in the url. name should be one of the followings: 'PROTOCOL', 'HOST', 'PATH', 'REF', 'AUTHORITY', 'FILE', 'USERINFO', 'PORT', 'QUERY'.

Example

mysql> SELECT parse_url ('https://doris.apache.org/', 'HOST');
+------------------------------------------------+
| parse_url('https://doris.apache.org/', 'HOST') |
+------------------------------------------------+
| doris.apache.org                               |
+------------------------------------------------+

Keywords

PARSE URL