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.
我的桌子是这样的:
班级 5 5 6 6 6 7 8 8 8 9 10
是否可以在不检索重复的类值的情况下检索类值 5、6、7、8、9、10?
SELECT DISTINCT CLASS FROM MYTABLE;
您可以使用 DISTINCT 来实现它。
句法:
SELECT DISTINCT column_name FROM table_name;
根据上述语法,您的查询应该是
SELECT DISTINCT CLASS FROM 'table_name'