SQLite入门语句之ALTER命令

SQLite 的 ALTER TABLE 命令不通过执行一个完整的转储和数据的重载来修改已有的表,在 SQLite 中,除了重命名表和在已有的表中添加列,ALTER TABLE 命令不支持其他操作。

1、重命名数据库表

alter table table_name  rename to new_table_name;

2、在已有数据库表中增加一个新的列

alter table table_name add column column_name 数据类型;

 

原文地址:https://www.cnblogs.com/francisblogs/p/6709919.html