HTML_ENCODE function [Miscellaneous]

Encodes special characters within strings to be inserted into HTML documents.

Syntax
HTML_ENCODE( string )
Parameters
  • string   Arbitrary string to be used in an HTML document.

Returns

LONG VARCHAR

LONG NVARCHAR

Remarks

This function returns the string argument after making the following set of substitutions:

Characters Substitution
" "
' '
& &
< &lt;
> &gt;
codes nn less than 0x20 &#xnn;

This function supports NCHAR inputs and/or outputs.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.