SQL QUOTENAME Function

The SQL QUOTENAME is one of the String functions, which will return the Unicode string by adding a delimiter to it. The basic syntax of the SQL Server QUOTENAME function is:

SELECT QUOTENAME(String_Expression, delimiter)

The list of arguments available for this is:

  • String_Expression: Please specify a valid String Expression
  • Delimiter: This is an optional SQL Server argument. Use this to specify the delimiter such as : [, ], {, }, (, ), “, ‘,  >, <, `.

SQL QUOTENAME Example

The following String method query will return the Unicode strings with the specified delimiters using the Quotename function.

SELECT QUOTENAME('abc{}def');  

SELECT QUOTENAME('abc[]def'); 

SELECT QUOTENAME('abc"def"');  

SELECT QUOTENAME('abc[]def', '(' );  

SELECT QUOTENAME('abc def', '{' );
SQL QUOTENAME Function 1
Categories SQL