Monday, July 30, 2012

Difference Between Drop And Truncate

    Drop Command: If we want to destroy the existing tables present in the database we use the Drop Command.

    Syntax: DROP TABLE <TableName>

    Example : Drop Table Customers

    Truncate Command: Removes all rows from a table. Here the columns Remains the same so that you can add New Records in the table.

    Note: We do not have Where Clause Here.

    Syntax: TRUNCATE TABLE  <TableName>

    Example : TRUNCATE TABLE Customers

    Truncate 
    Truncate table is faster in execution. 
    Truncate Releases Memory
    It will Reset Identity
    It Deletes all the records


No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...