Microsoft
DP-300 · Question #85
You have the following Transact-SQL query. Which column returned by the query represents the free space in each file?
The correct answer is C. ColumnC. Free space for the file in the below query result set will be returned by the FreeSpaceMB column. SELECT DB_NAME() AS DbName, name AS FileName, size/128.0 AS CurrentSizeMB, size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS INT)/128.0 AS FreeSpaceMB FROM sys.database_files…
Submitted by olafpl· Mar 6, 2026Secure, monitor, and optimize data storage and data processing
Question
You have the following Transact-SQL query. Which column returned by the query represents the free space in each file?
Exhibits
Options
- AColumnA
- BColumnB
- CColumnC
- DColumnD
How the community answered
(50 responses)- A14% (7)
- B4% (2)
- C78% (39)
- D4% (2)
Explanation
Free space for the file in the below query result set will be returned by the FreeSpaceMB column. SELECT DB_NAME() AS DbName, name AS FileName, size/128.0 AS CurrentSizeMB, size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS INT)/128.0 AS FreeSpaceMB FROM sys.database_files WHERE type IN (0,1);
Topics
#T-SQL#DMV#file space#database management
Community Discussion
No community discussion yet for this question.

