34,588
社区成员
发帖
与我相关
我的任务
分享
--2005
select row_number() over (order by a.id ) ,a.id from tab a,tab b
where a.callid=b.callid
select row_number() over(order by px) as ID
, callId
, startTime
, stopTime
, total
,control
from (
select Px=1, callId
, startTime
, stopTime
, total
,'null' as control
from tab1
union all
select Px=2, callId
, startTime
, stopTime
, 'null' as total
, control
from tab2
) as tb
select row_number() over(order by callid) as ID
, callId
, startTime
, stopTime
, total
,control
from (
select callId
, startTime
, stopTime
, total
,'null' as control
from 表1
union all
select callId
, startTime
, stopTime
, 'null' as total
, control
from 表12
) as tb