上图分别为a,b两列的数据让c的数据为b-a=?。有-符号则c=-。怎么写sql语句。
c的数据类型为什么?
update table set c = a-b
update table set c = DateDiff(MINUTE,a,b)
update table set c = DateDiff(MINUTE,a,b)
update table_name set c=datediff(minute,a,b)
update table set datediff(minute,a,b)
SELECT a,b,DATEDIFF(mi,a,b) FROM dbo.Table