How Truncate statement ?

  • Nice question, learned something.

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

  • Thanks for the question.

    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

  • Learned about Truncate when Foreign key ref. is available

  • So a DELETE would check if there were any rows still referencing the parent table, but a TRUNCATE can not and would therefore fail? even though we have cleared the child table already.

    Got to go home now, but will try it out soon.

    Thanks for the question. I always thought it would be easy to reset primary keys by doing a TRUNCATE on the tables.

Viewing 4 posts - 31 through 33 (of 33 total)

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