• KarenM

    SSChasing Mays

    Points: 608

    I too thought there might be a change in 2012 and that is was a trick question. 🙂

    I'm glad it wasn't.


  • Ken Wymore


    Points: 16588

    Thanks for the question. I thought, surely they wouldn't add a where clause to truncate. I didn't see how they could.

  • Koen Verbeeck

    SSC Guru

    Points: 258965

    Dana Medley (7/10/2012)

    Thomas Abraham (7/10/2012)

    Thanks for the question Samith. I'm guessing you specified an SQL Server version to avoid problems that occasionally pop up with QotD's that don't specify the version. In this case, it actually made the question less straightforward. But, you likely gathered that from the earlier posts. In summary,


    +57 + 1

    For a moment I had my doubts and thought "maybe it did change? Surely the QotD wouldn't be this easy. There has to be a catch." But, I went with what I knew and it was right. Thank you for the great question. QotD always gets my day started right. 😀


    Nice question though.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hardy21

    SSCrazy Eights

    Points: 9708

    KarenM (7/10/2012)

    I too thought there might be a change in 2012 and that is was a trick question. 🙂

    I'm glad it wasn't.


    +1 🙂


  • Jamsheer

    Ten Centuries

    Points: 1136

    I Think these type of stupid questions should move to 'humor' category 😛

  • Samith C

    Mr or Mrs. 500

    Points: 519

    Dear Jamshi

    I think u got wrong answer:-P

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

  • TomThomson

    SSC Guru

    Points: 104773

    john.arnott (7/10/2012)

    I nearly bit at the implication that SQL 2012 added syntax to allow truncating a table that met certain conditions. Had to find BOL 2012 online to disuade myself of that notion.

    I was tempted to be confused because I don't have 2012, but then thought "if you could put a where clause on truncate table then that would be the thin end of the wedge for a where clause on other DDL statements" and my mind was sufficiently boggled :crazy: :sick: at the consequences that I didn't bother to check BoL.

    Edit: writing this made me ask myself how I knew that MS hadn't reclassified TRUNCATE TABLE as DML (so permitted a where clause) instead of DDL. So maybe I got the right answer by carelessly ignoring a bizarre but maybe possible option - but if I'd considered that option I would have assigned it too low a probability to make me check BoL anyway.


  • Neha05

    Default port

    Points: 1494

    Nice question!

  • kalyani.k478

    Default port

    Points: 1400

    easy one

  • Neeraj Prasad Sharma

    Ten Centuries

    Points: 1285

    Never used SQL 2012.

    but 1+ as per basic of truncate


    Neeraj Prasad Sharma
    Sql Server Tutorials

Viewing 10 posts - 31 through 40 (of 40 total)

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