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 查询,但我宁愿在 1 个查询而不是多个查询中获取我需要的所有数据。
我如何将其变成子查询?
SELECT * FROM categories ORDER BY categoryName ASC SELECT * FROM locations ORDER BY locationName ASC
尝试这个...
SELECT * FROM categories,(SELECT * FROM locations ORDER BY locationName ASC) AS location ORDER BY categoryName ASC