naming objects (identifiers)

  • If you can only use certain characters and words to identify objects, else encase the identifier in brackets or double quotes (delimiting), would it make sense to just delimit all your objects?  Instead of delimiting "problem" object names, it seems delimiting every object name, which seems a lot like commenting out the name, so you are free to name as you wish, would be the best practice.

    Curious to see what everyone thinks about this approach.  I'm tempted to delimit all my identifiers, so I don't have to think about identifiers that won't work.

  • Delimiting all identifiers is an excellent approach.

    I think by lazyness and readability we decided to use a naming convention prohibiting the use of problem object names ( like spaces in a name).

  • It doesn't hurt to delimit, but I think it would be a best practice to name the objects correctly to begin with. You can use underscores instead of spaces.

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

  • With the growth in the Business Intelligence area, I have a feeling this will become a defacto best practice. One only needs to look at the MDX syntax, almost everything is delimited.

     

    --------------------
    Colt 45 - the original point and click interface

  • (feeling a little proud of my idea)

  • You can go in Edit post / Delete to remove one of them.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply