SSMS Delete vs T-SQL DROP

  • Hi,

    Via SSMS I am able to Delete a table. I could also script a DROP statement, but which one is a better way of removing the object and why?

    My initial thoughts are that they are the same, the only differrence being that a DROP statement can be scripted whilst a SSMS delete action must be manually executed.

    How does this sound?

    Mike

  • SSMS executes a DROP TABLE against SQL when you say select 'delete table'

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • They should be the same.

    If you go to SSMS and delete something, you'll get the Delete Object window. At the top, you have a Script button. If you click this, you script out the action that you wanted to take with SSMS. You'll see that the script contains a DROP statement.

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

  • Sounds like my initial thoughts are confirmed.

    Thanks for replying.

    Mike

Viewing 4 posts - 1 through 3 (of 3 total)

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