Home Forums SQL Server 2005 SQL Server 2005 General Discussion Is it "better" to specify the definition of a temporary table, or just define it on the fly? RE: Is it "better" to specify the definition of a temporary table, or just define it on the fly?

  • Jeff Moden (10/30/2012)


    Luis Cazares (10/30/2012)


    I knew it was doable, but I believe is better to have an explicit CREATE TABLE statement for this situations.

    Why?

    Why? Because I get paid by line of code. Ok, that's not true.

    The reason is much similar to comments, it makes code more readable.

    I won't use Craig post but that would have been a good reason if I knew it before.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2