[protocol:][//host[:port]][path][?query][#fragment]
:
and ?
.Function | Description | Example | Output |
url_extract_fragment(url) | Extracts fragment from the URL. The result is of the varchar type. | * | select url_extract_fragment('https://console.tencentcloud.com/#/project/dashboard-demo/categoryList') | /project/dashboard-demo/categoryList |
url_extract_host(url) | Extracts host from the URL. The result is of the varchar type. | * | select url_extract_host('https://console.tencentcloud.com/cls') | console.cloud.tencent.com |
url_extract_parameter(url, name) | Extracts the value of query from the URL. The result is of the varchar type. | * | select url_extract_parameter('https://console.tencentcloud.com/cls?region=ap-chongqing','region') | ap-chongqing |
url_extract_path(url) | Extracts path from the URL. The result is of the varchar type. | * | select url_extract_path('https://console.tencentcloud.com/cls?region=ap-chongqing') | /cls |
url_extract_port(url) | Extracts port from the URL. The result is of the bigint type. | * | select url_extract_port('https://console.tencentcloud.com:80/cls?region=ap-chongqing') | 80 |
url_extract_protocol(url) | Extracts protocol from the URL. The result is of the varchar type. | * | select url_extract_protocol('https://console.tencentcloud.com:80/cls?region=ap-chongqing') | https |
url_extract_query(url) | Extracts the key of query from the URL. The result is of the varchar type. | * | select url_extract_query('https://console.tencentcloud.com:80/cls?region=ap-chongqing') | region=ap-chongqing |
url_encode(value) | Escapes value so that it can be used in URL_query .Letters will not be decoded. .-*_ will not be encoded. Spaces are decoded as +. Other characters are decoded into the UTF-8 format. | * | select url_encode('https://console.tencentcloud.com:80/cls?region=ap-chongqing') | https%3A%2F%2Fconsole.cloud.tencent.com%3A80%2Fcls%3Fregion%3Dap-chongqing |
url_decode(value) | Decodes the URL. | * | select url_decode('https%3A%2F%2Fconsole.cloud.tencent.com%3A80%2Fcls%3Fregion%3Dap-chongqing') | https://console.tencentcloud.com:80/cls?region=ap-chongqing |
Apakah halaman ini membantu?