Alternate Results with ORDER BY clause

前端 未结 1 2036
陌清茗
陌清茗 2021-01-18 11:17
CREATE TABLE TEST (
  customername varchar(50)
);

INSERT INTO TEST VALUES(\'CUSTOMER 1\');
INSERT INTO TEST VALUES(\'CUSTOMER 1\');
INSERT INTO TEST VALUES(\'CUSTOM         


        
相关标签:
1条回答
  • 2021-01-18 11:31
    SELECT  customername
    FROM    TEST
    ORDER BY ROW_NUMBER() OVER ( PARTITION BY customername ORDER BY customername )
    
    0 讨论(0)
提交回复
热议问题