It returns nvarchar(258) data type.
Examples of QUOTENAME Function :
Example 1 : Use of QUOTENAME function in select clause
* Delimiting string using double quote.
SELECT QUOTENAME('Syntax-Example','"')
Output
"Syntax-Example"
Above example returns delimited string with double quote.
* Delimiting string using single quote
SELECT QUOTENAME('Syntax-Example','''')
Output
'Syntax-Example'
Above example returns delimited string with single quote.
* Delimiting string using default value square brackets.
SELECT QUOTENAME('Syntax-Example')
Output
[Syntax-Example]
Above example returns default delimited string with square brackets.