nerdexam
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

DP-300 question #85 exhibit 1
DP-300 question #85 exhibit 2

Options

  • AColumnA
  • BColumnB
  • CColumnC
  • DColumnD

How the community answered

(50 responses)
  • A
    14% (7)
  • B
    4% (2)
  • C
    78% (39)
  • D
    4% (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.

Full DP-300 Practice