T SQL

  • Comments posted to this topic are about the item T SQL

    [font="Verdana"] There is no Wrong time to do a Right thing 🙂 [/font]

  • Good question 🙂

    M&M

  • I got the answer in first click but then I thought what if SQL 2012 get WHERE clause in TRUNCATE command :hehe:

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • rhythmk (7/9/2012)


    I got the answer in first click but then I thought what if SQL 2012 get WHERE clause in TRUNCATE command :hehe:

    +1

  • Easy point, thx!

  • Easy one 🙂

  • Nice one,thank you for the point.

    “When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris

  • Pretty confident the answer would be an error, but I had to go and test it because the question specified SQL 2012 and I thought they might have changed it! 😀

  • kupy (7/10/2012)


    rhythmk (7/9/2012)


    I got the answer in first click but then I thought what if SQL 2012 get WHERE clause in TRUNCATE command :hehe:

    +1

    +2 !

  • Toreador (7/10/2012)


    kupy (7/10/2012)


    rhythmk (7/9/2012)


    I got the answer in first click but then I thought what if SQL 2012 get WHERE clause in TRUNCATE command :hehe:

    +1

    +2 !

    +3...

    What you don't know won't hurt you but what you know will make you plan to know better
  • I thought this must be a trick question, but no...

  • Well this has been the definition from 6.5. Actually I was confused by the fact of SQL 2012.

    But eventually the definition does not change at all.

    +1.

  • paul.knibbs (7/10/2012)


    Pretty confident the answer would be an error, but I had to go and test it because the question specified SQL 2012 and I thought they might have changed it! 😀

    +1

    _____________________________________________________________________
    [font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]

  • Thanks for the question.

    KR,

    Iulian

  • rhythmk (7/9/2012)


    I got the answer in first click but then I thought what if SQL 2012 get WHERE clause in TRUNCATE command :hehe:

    I pondered that, and tried to think of a way it could be written to only deallocate* selected pages, and couldn't figure out a quick way it could have been implemented.

    Then I wondered if it could have been changed to ignore the erroneous clause... but decided that would create an even larger hue and of course cry. "No No..." I told myself, "the current behaviour is perfect. They couldn't possibly have changed it."

    ---====####====----

    * "Deallocate"... or is there a more proper term for what TRUNCATE does?

Viewing 15 posts - 1 through 15 (of 39 total)

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