T SQL

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

    I'm glad it wasn't.

    Thanks.

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

  • 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.

    +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. 😀

    +42

    Nice question though.

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

  • 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.

    Thanks.

    +1 🙂

    Thanks

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

  • Dear Jamshi

    I think u got wrong answer:-P

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

  • 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.

    Tom

  • Nice question!

  • easy one

  • Never used SQL 2012.

    but 1+ as per basic of truncate

    😀

    Neeraj Prasad Sharma
    Sql Server Tutorials

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

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