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 数据类型;

 

posted @ 2017-04-14 17:27  Francis01  阅读(1441)  评论(0编辑  收藏  举报