Blogroll

Get a website with Godaddy


Logo designer Fiverr Frelancer

Tuesday, August 25, 2015

SQL - Truncate , Drop table

  1. Hi, don't mess up with these sql command, truncate and drop . Below are the definitions.
  2. TRUNCATE TABLE removes all rows from a table, but the table structure and its columns, constraints, indexes, and so on remain. To remove thetable definition in addition to its data, use the DROP TABLE statement.


TRUNCATE TABLE 
    [ { database_name .[ schema_name ] . | schema_name . } ]
    table_name
    [ WITH ( PARTITIONS ( { <partition_number_expression> | <range> } 
    [ , ...n ] ) ) ]
[ ; ]

<range> ::=
<partition_number_expression> TO <partition_number_expression>




DROP TABLE [ database_name . [ schema_name ] . | schema_name . ]
table_name [ ,...n ]
 [ ; ]

TQ

No comments:

Post a Comment

Amazon store

alidropship plugin

alidropship plugin
alidropship plugin

Total Pageviews

About