If you can, how to operate?
CodePudding user response:
With a as (select 101 id, 'name1' names from dual
Union select 101 id, 'name2' names from dual
Union select 101 id, "name3" names from dual
Union select 102 id, 'name1' names from dual
Union select 103 id, 'name1' names from dual
Union select 103 id, "name3" names from dual)
The select row_number () over (partition by id order by id) num, a. *
From a
CodePudding user response:
Simpler way to use timestamp type instead of the date