Rank would be too generic for me. I would require some additional word as
part of the column name. AgeRank or the like. Alternately, a non-singular
writing of it such as Ranking, but preferably the more descriptive two word
naming.


On Wed, Jan 22, 2014 at 3:34 PM, DURETTE, STEVEN J <sd1...@att.com> wrote:

>
> You might want to reconsider that. It could bite you in the future.
>
> I had a table built in SQL 2000 that had a field RANK.  All of my queries
> referenced it as [RANK] and everyone made fun of me because of putting the
> [] around objects. When we were upgraded to sql 2008 (yes there was a
> version skip) all of my stuff worked just fine, but a lot of theirs gave
> weird results because RANK became a function and a reserved word in SQL.
> Using [], "" or whatever your specific DB uses allows for future proofing.
>
> Steve
>
>
> -----Original Message-----
> From: Michael Dinowitz [mailto:mdino...@houseoffusion.com]
> Sent: Wednesday, January 22, 2014 2:35 PM
> To: sql
> Subject: Re: underscore prefix for table name
>
>
> My style rejects anything that would require me to use brackets around a
> table, column, or any other name.
>
>
> On Tue, Jan 21, 2014 at 8:11 PM, George Gallen <g_gal...@hotmail.com>
> wrote:
>
> >
> > You could always surround it with [ and ] like [_TABLENAME_]
> >
> > > On Jan 21, 2014, at 8:01 PM, "Michael Dinowitz" <
> > mdino...@houseoffusion.com> wrote:
> > >
> > >
> > > I use an underscore for look-up tables in an MS SQL2008 DB. To me, a
> > > look-up table is anything that will almost never change. Things like
> > > _roles, _states, _ethnicity. According to one book, an underscore as a
> > > prefix should not be allowed but in practice it does not seem to cause
> > any
> > > problems.
> > > Has anyone seen any problems with this? I'm writing up a sql
> conventions
> > > spec for a contract.
> > >
> > > Thanks
> > > Michael
> > >
> > >
> > >
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3529
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm

Reply via email to