㈠ sql閲嶅嶆暟鎹鍙鍙栦竴𨱒¤板綍
1銆丼QL SELECT DISTINCT 璇鍙
鍦ㄨ〃涓锛屽彲鑳戒细鍖呭惈閲嶅嶅笺傝繖骞朵笉鎴愰梾棰桡纴涓嶈繃锛屼粎浠呭垪鍑轰笉钖岋纸distinct锛夌殑鍊笺
鍏抽敭璇 DISTINCT 鐢ㄤ簬杩斿洖鍞涓涓嶅悓镄勫笺
璇娉曪细
SELECT DISTINCT 鍒楀悕绉 FROM 琛ㄥ悕绉
浣跨敤 DISTINCT 鍏抽敭璇
2銆佸瓙镆ヨ㈤檺鍒惰繑锲炵粨鏋
SELECT*FROMTestData
WHERE
idIN
(
--镙规嵁Data鍒嗙被銮峰彇鏁版嵁链灏廔D鍒楄〃
selectmin(id)fromTestData
groupbyData
)