Skip to main content

DOMAIN

Description

Extract the domain name from the string URL

Syntax

DOMAIN ( <url> )

Parameters

ParameterDescription
<url>URL from which the domain name needs to be extracted

Return value

Domain name of parameter <url>

Example

SELECT DOMAIN("https://doris.apache.org/docs/gettingStarted/what-is-apache-doris")
+-----------------------------------------------------------------------------+
| domain('https://doris.apache.org/docs/gettingStarted/what-is-apache-doris') |
+-----------------------------------------------------------------------------+
| doris.apache.org |
+-----------------------------------------------------------------------------+