Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Monday, October 15, 2018 5:49 AM
Guys
when designing a new table i am getting [Column Name]
anyone has any idea how to disable that ?
Monday, October 15, 2018 7:01 AM
Hi ranbd,
Could you please tell us where did you meet the Square brackets? Could you please share the screenshot to us for analysis? Do you mean the script generated by SSMS?
The square brackets [] is a specification in T-SQL which be used to delimit identifiers. This is necessary if the column name is a reserved keyword or contains special characters such as a space or hyphen.
SSMS uses this specification to generate script, since now, we cannot find a method to disable all Square brackets, in ssms 17.6, it has Tools/Options settings to turn off schema inclusion and bracket escaping of object names during drag/drop. Names that include spaces or closing brackets will always be escaped. Please refer to it: https://feedback.azure.com/forums/908035-sql-server/suggestions/32671051-give-us-option-to-not-have-square-brackets-when-dr
Best Regards,
Teige
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Monday, October 15, 2018 7:07 AM
Guys
when designing a new table i am getting [Column Name]
anyone has any idea how to disable that ?
Question is why do you want to do it
[] is essential when you column names have multiple words separated by spaces or starts with numbers etc. So its also safe to enclose the column names within []
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page
Monday, October 15, 2018 2:27 PM | 11 votes
FWIW, I loathe square brackets in SQL code. It makes the code so much harder to read. Make sure that the designers follow the rules for standard identifiers and no delimiters are needed. I wish that all tools would default to *not* add square brackets and we would probably see less identifiers that requires square brackets int he first place.