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.
如果我有一个名为“photographs”的表,其中包含以下列:“id、gallery_name、filename、type、size、caption”,如何创建一个仅包含来自 gallery_name 列的唯一值的无序列表?
如果我正确理解了您的问题(即我没有遗漏您尝试做的某些复杂方面),则以下 MySQL 命令应该可以工作:
SELECT DISTINCT `gallery_name` FROM `photographs`