Re: Square Brackets
- From: "Roy Harvey (SQL Server MVP)" <roy_harvey@xxxxxxxx>
- Date: Thu, 15 Nov 2007 07:31:48 -0500
On Thu, 15 Nov 2007 08:56:29 +0000 (UTC), Erland Sommarskog
<esquel@xxxxxxxxxxxxx> wrote:
Maciek Sarnowicz [MSFT] (macies@xxxxxxxxxxxxxxxxxxxx) writes:
Could you share some reasons why the square brackets are not welcome?
They add noise and makes code more difficult to read.
Actually, I think there should be three options:
o Always square brackets.
o Square brackets when needed.
o Never square brackets.
Roy seemed to prefer the latter, to catch badly named objects. But it
might be necessary with this option to make an exception: if you script
a table or an index is included, in most of the name the location is
PRIMARY which in this is context is a an identifier and not a keyword.
I would be VERY happy with "Square brackets when needed." That would
be optimal, even for me! 8-)
And let us not forget the one keyword in square brackets problem that
can not always be avoided: ON [PRIMARY] in a CREATE TABLE script. Of
course Microsoft were the ones that used the keyword in this case.
That would be a clear case where "as needed" is needed.
Roy Harvey
Beacon Falls, CT
.
- References:
- Re: Square Brackets
- From: Maciek Sarnowicz [MSFT]
- Re: Square Brackets
- From: Erland Sommarskog
- Re: Square Brackets
- Prev by Date: Re: SQL Srvr 2005 Express & import
- Next by Date: Re: Square Brackets
- Previous by thread: Re: Square Brackets
- Next by thread: Re: Square Brackets
- Index(es):
Relevant Pages
|