Mysql: Which to use when: drop table, truncate table, delete from table

前端 未结 5 1725
臣服心动
臣服心动 2020-12-14 10:59

List the differences between the following MySql commands.

  • drop table tablename;
  • truncate table tablename;
  • delete from
5条回答
  •  执笔经年
    2020-12-14 11:22

    In addition to the answers above, on Oracle RDBMS, "delete" is a transaction that can be rolled back if you didn't commit. "Truncate" cannot.

提交回复
热议问题