小编wan*_*mer的帖子

mysql - >插入到tbl(从另一个表中选择)和一些默认值

正如标题所说,我试图插入一个表中,从另一个表中选择值和一些默认值.

INSERT INTO def (catid, title, page, publish) 
(SELECT catid, title from abc),'page','yes')


INSERT INTO def (catid, title, page, publish) 
VALUES
((SELECT catid, title from abc),'page','yes'))
Run Code Online (Sandbox Code Playgroud)

第一个查询给出了mysql错误,第二个查询给出了列数不匹配.

我需要做什么?

mysql insert-into

96
推荐指数
4
解决办法
18万
查看次数

标签 统计

insert-into ×1

mysql ×1