跳到主要内容

CUT_TO_FIRST_SIGNIFICANT_SUBDOMAIN

说明

语法

VARCHAR cut_to_first_significant_subdomain(VARCHAR url)

在 URL 中提取出域中包含顶级子域直至“第一个有效子域”的部分, 若不合法时,则会返回空字符串

mysql [(none)]>select cut_to_first_significant_subdomain("www.baidu.com");
+-----------------------------------------------------+
| cut_to_first_significant_subdomain('www.baidu.com') |
+-----------------------------------------------------+
| baidu.com |
+-----------------------------------------------------+

mysql [(none)]>select cut_to_first_significant_subdomain("www.google.com.cn");
+---------------------------------------------------------+
| cut_to_first_significant_subdomain('www.google.com.cn') |
+---------------------------------------------------------+
| google.com.cn |
+---------------------------------------------------------+

mysql [(none)]>select cut_to_first_significant_subdomain("wwwwwwww");
+------------------------------------------------+
| cut_to_first_significant_subdomain('wwwwwwww') |
+------------------------------------------------+
| |
+------------------------------------------------+

关键词

CUT_TO_FIRST_SIGNIFICANT_SUBDOMAIN

Doris 首页
下载 PDF