zmień kontrast font size: A A A
rss polski
you are at Encyclopedia of SQL >> TRUNCATE

TRUNCATE

To erase whole data from table without deleting table from database there is used TRUNCATE.

Syntax


TRUNCATE TABLE `table_name`

To gain this same result there can be used DELETE.
To delete whole table with its data use DROP

Example

Delete whole data from `people` table

namesurnameage
PawełKowalski3
PiotrJanik7
MichałNowak13

query


TRUNCATE TABLE `people`

result

namesurnameage
[ wróć na górę strony ]