sql server 数字后面的点是什么意思

;WITH DBIO AS
(
 SELECT 
  DB_NAME(IVFS.database_id) AS db,
  CASE WHEN MF.type=1 THEN 'log' ELSE 'data' END AS file_type,
  SUM(IVFS.num_of_bytes_read+IVFS.num_of_bytes_written) AS IO,
  SUM(IVFS.io_stall) AS io_stall
 FROM sys.dm_io_virtual_file_stats(null,null) IVFS
 JOIN sys.master_files AS MF
 ON IVFS.database_id=MF.database_id
 AND IVFS.file_id=MF.file_id
 GROUP BY DB_NAME(IVFS.database_id),MF.type
)
SELECT db,file_type,
CAST(1.* IO/(1024*1024) AS DECIMAL(12,2)) AS io_mb,
CAST(io_stall/1000. AS DECIMAL(12,2)) AS io_stall_s,
CAST(100. * io_stall/SUM(io_stall) OVER() AS DECIMAL(10,2)) AS io_stall_pct,
ROW_NUMBER() OVER(ORDER BY io_stall DESC) AS rn
 FROM DBIO 
 ORDER BY io_stall DESC

1. 和 100. 加上点之后什么意思

拉莫斯之舞
浏览 441回答 3
3回答

慕妹3146593

告诉SQL Server, 别当整数处理,这是小数计算。

一只萌萌小番薯

表示小数。

慕婉清6462132

表示小数计算。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

SQL Server