DECLARE @tb1 Table( drive varchar(20), [MB 可用空間] varchar(20)) INSERT INTO @tb1 Exec master.dbo.xp_fixeddrives select drive , CAST( CAST((CAST([MB 可用空間 ...
DECLARE @tb1 Table
(
drive varchar(20),
[MB 可用空間] varchar(20)
)
INSERT INTO @tb1
Exec master.dbo.xp_fixeddrives
select drive , CAST( CAST((CAST([MB 可用空間] as decimal(9,2))/1024 ) as decimal(9,2)) as varchar)+'G' as 剩餘空間 from @tb1