SQL Truncate, Delete, Drop advise

后端 未结 6 1652
礼貌的吻别
礼貌的吻别 2021-01-15 03:17

I have a table in a SQL db that I want to remove the data from? I want to keep the columns though.

e.g. my table has 3 columns, Name, Age, Date. I don\'t want to rem

6条回答
  •  情书的邮戳
    2021-01-15 04:18

    Delete: The DELETE Statement is used to delete rows from a table.

    Truncate: The SQL TRUNCATE command is used to delete all the rows from the table and free the space containing the table.

    *Drop:* The SQL DROP command is used to remove an object from the database. If you drop a table, all the rows in the table is deleted and the table structure is removed from the database

提交回复
热议问题