當前位置:聚美館>智慧生活>心理>

用SQL求2個狀態的時間差

心理 閱讀(3.33W)
用SQL求2個狀態的時間差

select temp.*

DATEDIFF(MI,usDATa+cast(ustime as datetime),usDATa+cast(ustime as datetime)) '時間差(分鐘)'

from temp,(select * from temp) a

where ionno=ionno

and tionno=tionno

and tustype='B'

and tustype='R'

以下是截圖