• Andy Hyslop (2/11/2013)


    I recently has to take a written SQL test for a client and one of the questions got me stumped (from memory was something like this):

    Why should User Defined Functions not be prefixed UDF or udf, views not Prefixed with VW or vw and Stored Procedures not USP or usp

    I couldn't come up with a reason for not using these naming conventions..:crazy:

    Can anyone enlighten me?

    Andy

    I agree with what has already been suggested but I have a cold, hard reason for not doing it for tables and views. There have been many times where I've needed to change the structue of a table but couldn't do so because of some bad coding practices on the front end. To trick the front end into not seeing the change, I changed the table name to something else and then made a view using the original table name. I don't know about you but it kind of defeats the whole purpose to have a view with a prefix of "tbl". 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)