INSERT INTO campaign_ledger (`campaign_id`, `description`, amount, balance, timestamp)
VALUES (SELECT id as campaign_id, 'Ported from campaigns' as description, budget_remaining as amount, budget_remaining as balance, NOW() as timestamp FROM campaigns)
这是我的语法,但我收到一条错误消息:
您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以获取正确的语法,以便在第 2 行的“SELECT id as campaign_id、“Ported from campaign”作为描述、budget_remaini 附近使用
我究竟做错了什么?