正如标题所说,我试图插入一个表中,从另一个表中选择值和一些默认值.
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错误,第二个查询给出了列数不匹配.
我需要做什么?