Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 SQL 查询在尝试执行查询时出错:
错误:查询输入必须包含至少一个表或查询
INSERT into Posts (PostText,TimePosted, TID) VALUES ('My Post','2013-04-11 13:50:18', (SELECT MAX(TID) FROM Threads AS TID))
将文字字段与选择和移动别名结合起来;
INSERT into Posts (PostText,TimePosted, TID) SELECT 'My Post','2013-04-11 13:50:18', MAX(TID) AS TID FROM Threads
您没有在查询中指定表名。
您的表中有 3 个字段,您正在发送 3 个值(选择查询的最后一个值)。
但是您还没有为要插入数据的主查询编写表名。