Sql Truncate Table

Truncate Table Command:- The SQL TRUNCATE TABLE is used to delete complete data from an existing table, but not the table itself. It performs the same function as a DELETE statement without a WHERE clause. 

SYNTAX:-

TRUNCATE TABLE table_name ;

EXAMPLE:-

Consider a STUDENT table having the following records:-

TRUNCATE TABLE STUDENT ;

Now, the STUDENT table is truncated and all the records from the table have been Deleted.



Comments

Popular posts from this blog

ASP.NET Overview

SQL AND ,OR, NOT Operators

SQL Joins