x

disable square braces when generating scripts from SSMS

How do I disable square braces when generating scripts from SSMS?

more ▼

asked Oct 12, 2009 at 10:27 AM in Default

binoj gravatar image

binoj
32 1 1 1

(comments are locked)
10|1200 characters needed characters left

7 answers: sort voted first

Hate It. I believe there should be something like the VB "Option Explicit" which would explicitly disable any reserved words from being a DB object.

more ▼

answered Oct 12, 2009 at 12:54 PM

dvroman gravatar image

dvroman
1.1k 2 2

(comments are locked)
10|1200 characters needed characters left
Been using SQL Server since Sybase 4.2 and this drives me NUTS! It is NOT good practice to use brackets. What is good practice is NOT USING RESERVED WORDS as object names. Bracketing object names is a quick way to violate all sorts of bad practices, like using punctuation in your name. The genesis of brackets had to do with cross platform development and conversions. You can always add brackets to your code if you need to and SQL is smart enough to know the difference contextually 95% of the time anyway. When scripting, SSMS should identify reserved words that are being used as objects and bracket ONLY those. This would make it more obvious that you are using a reserved word. Please change this.
more ▼

answered Dec 05, 2012 at 12:09 AM

kferrell gravatar image

kferrell
0

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x344
x126
x69
x14
x1

asked: Oct 12, 2009 at 10:27 AM

Seen: 4749 times

Last Updated: May 15, 2013 at 11:36 AM