Select rows with same id but different value in another column

后端 未结 8 1603
名媛妹妹
名媛妹妹 2020-12-08 01:50

I tried for hours and read many posts but I still can\'t figure out how to handle this request:

I have a table like this:

+------+------+
|ARIDNR|LIE         


        
8条回答
  •  -上瘾入骨i
    2020-12-08 02:32

    Use this

    select * from (
     SELECT ARIDNR,LIEFNR,row_number() over 
         (partition by ARIDNR order by ARIDNR) as RowNum) a
    where a.RowNum >1
    

提交回复
热议问题