gpt4 book ai didi

sqlite alter table 在单个语句中添加多个列

转载 作者:行者123 更新时间:2023-11-30 16:08:18 26 4
gpt4 key购买 nike

是否可以在 sqlite 的单个语句中更改表添加多个列?以下内容将不起作用。

alter table test add column mycolumn1 text, add column mycolumn2 text;

最佳答案

不,您必须一次添加一个。请参阅 SQLite's ALTER TABLE documentation 顶部的语法图:

ALTER TABLE syntax

ADD 分支中没有循环,因此不允许重复。

关于sqlite alter table 在单个语句中添加多个列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59392604/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com