Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
对字符串进行编码以在 HTTP 中使用。这也称为 URL 编码。
HTTP_ENCODE( string )
string 要进行编码以用于 HTTP 传输的任意字符串。
LONG VARCHAR 或 LONG NVARCHAR
此函数在进行以下一组替代后返回字符串参数。此外,所有十六进制编码小于 20 或大于 7E 的字符都将替换为 %nn,其中 nn 为字符编码。
此函数支持 NCHAR 输入和/或输出。
SQL/2008 服务商扩充。
以下语句返回字符串 /opt%26id=123%26text='oid:c%09d%20ef':
/opt%26id=123%26text='oid:c%09d%20ef'
SELECT HTTP_ENCODE('/opt&id=123&text=''oid:c\x09d ef''')