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.
是否可以在 MySQL 中即时创建记录而无需先创建临时表然后填充它?
我正在考虑这样的事情(语法不正确)示例:
SELECT * FROM (`id`, `value`) VALUES (1, "FOO"), (2, "BAR");
是的,你可以这样做——
SELECT 1 id, 'FOO' value UNION SELECT 2 id, 'BAR' value