从另一个表和一个文字创建一个表
我正在使用 sqlite 并尝试从另一个表创建一个表。
这有效:
create table sources_tmp as select "literal" system,name,user from sources;
但它不允许我指定“文字”的类型。
我已经尝试过,但显然不是这样工作的:
create table sources_tmp as select "literal" system as $TYPE,name,user from sources;
I'm working with sqlite and trying to create a table from another.
This works:
create table sources_tmp as select "literal" system,name,user from sources;
but it doesn't allow me to specify the type for the "literal".
I've tried this but doesn't work that way apparently:
create table sources_tmp as select "literal" system as $TYPE,name,user from sources;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 CAST()。 “AS”还有别的意思。例子:
Use CAST(). "AS" means something else. Example: