SQLITE:如何将表创建为另一个表并设置默认值?

时间:2015-08-14 05:56:07

标签: sqlite

我使用的代码:

$query = "CREATE TABLE `new_form` as select * from `form`

但new_form不能有默认值

就像列ID一样,auto_increment。

1 个答案:

答案 0 :(得分:0)

使用CREATE TABLE ... AS SELECT ...。

是不可能的

在复制数据之前,您必须create the new table manually