How To Select A Column In Sql Server With A Special Character In The Column Name?
I have a table contain the '%' in the column title, and this cause problem when I do the select statement on that column (Find below for more details). Does anyone know how can I s
Solution 1:
You may want to wrap your column name in square brackets to have your identifier delimited:
SELECT [%Phone]FROM Table1
If the QUOTED_IDENTIFIER
option is set to ON, you can also use ANSI-SQL compliant double quotation marks to delimit identifiers:
SELECT "%Phone" FROM Table1
Post a Comment for "How To Select A Column In Sql Server With A Special Character In The Column Name?"