| RE: [SQLDownUnder] [SQLStyle] #12: Use full reserved words |
- From: Tony Wright
- Subject: RE: [SQLDownUnder] [SQLStyle] #12: Use full reserved words
- Date: Thu, 30 Aug 2007 03:54:05 -0700
- Follow-Ups:
- References:
- Prev by Date: [SQLDownUnder] New transaction cannot enlist in the specified transaction coordinator
- Next by Date: Re: [SQLDownUnder] [SQLStyle] #12: Use full reserved words
- Previous by thread: RE: [SQLDownUnder] SQL Server 2005 Transaction Replication
- Next by thread: RE: [SQLDownUnder] [SQLStyle] #12: Use full reserved words
- Index(es):
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
I honestly don't see how using the full reserved words really benefits us, other than making us write more words. Convince me?
Also write types in lowercase.
From: SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx [SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Greg Low [greglow@xxxxxxxxx] Sent: Thursday, 30 August 2007 3:36 PM To: SQLDownUnder@xxxxxxxxxxxxxxxxxxxxxx Subject: [SQLDownUnder] [SQLStyle] #12: Use full reserved words One rule that Joe suggests is always using full reserved words. For me that would mean:
Use AS even though it’s optional eg:
SELECT blah AS alias instead of SELECT blah alias
And
INNER JOIN instead of JOIN
And
LEFT OUTER JOIN instead of LEFT JOIN
And
CREATE PROCEDURE instead of CREATE PROC
Etc.
However, the exception to this rule is that he suggests not using full character data types ie:
CHAR(10) instead of CHARACTER(10)
And
VARCHAR(10) instead of VARYING CHARACTER(10)
And
NVARCHAR(10) instead of NATIONAL VARYING CHARACTER(10)
Tend to agree with these. Can’t say I’ve ever seen anyone write NATIONAL VARYING CHARACTER. However, he does suggest writing the other data types in full ie:
DECIMAL rather than DEC and INTEGER rather than INT.
Thoughts?
Another perhaps strange way of mine is that I tend to write the data types in lower case even though I write all the other reserved words in upper case.
Thoughts? Regards, Greg
Dr Greg Low Suite 206 Nolan Tower | 29 Rakaia Way | Docklands | VIC 3008 | Australia M: +61 419 201 410 | E: mailto:greg.low@xxxxxxxxxxx | W: www.readify.net
|
(Click here for more information on the sqldownunder mailling list)
