• Oleg Netchaev (5/14/2010)


    CirquedeSQLeil (5/14/2010)


    john.arnott (5/14/2010)


    This was a good way to point out the risk of using reserved words within brackets as a user-defined object. While I would suppose few people would want to name a table "WHERE" as in the QOD, some other words like "Name" may be more attractive.

    Alternatively, the use of brackets does offer the opportunity to have some fun...... (yes, this works).

    create table [where]([Select from there] varchar(50))

    insert into [where] values ('Careful with this')

    select [from there].[Select from there] [from there] from [where] [from there]

    How many people would be fooled by that chicanery?

    Cool, I just learned a new word, thank you Jason (chicanery - the use of clever but tricky talk or action to deceive or evade someone).

    Oleg

    Woot :w00t:

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events