Skip to content

Latest commit

 

History

History
84 lines (67 loc) · 2.44 KB

File metadata and controls

84 lines (67 loc) · 2.44 KB
title FILEGROUP_NAME (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/03/2017
ms.prod sql
ms.prod_service sql-database
ms.service
ms.component t-sql|functions
ms.reviewer
ms.suite sql
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
FILEGROUP_NAME_TSQL
FILEGROUP_NAME
dev_langs
TSQL
helpviewer_keywords
displaying filegroup names
identification numbers [SQL Server], filegroups
filegroups [SQL Server], IDs
IDs [SQL Server], filegroups
FILEGROUP_NAME function
filegroups [SQL Server], names
names [SQL Server], filegroups
viewing filegroup names
ms.assetid 26add1c0-56e5-47a8-b489-ae56784a7ee9
caps.latest.revision 26
author edmacauley
ms.author edmaca
manager craigg
ms.workload Inactive

FILEGROUP_NAME (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

Returns the filegroup name for the specified filegroup identification (ID) number.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
FILEGROUP_NAME ( filegroup_id )   

Arguments

filegroup_id
Is the filegroup ID number for which to return the filegroup name. filegroup_id is smallint.

Return Types

nvarchar(128)

Remarks

filegroup_id corresponds to the data_space_id column in the sys.filegroups catalog view.

Examples

The following example returns the filegroup name for the filegroup ID 1 in the [!INCLUDEssSampleDBnormal] database.

  
SELECT FILEGROUP_NAME(1) AS [Filegroup Name];  
GO  

[!INCLUDEssResult]

Filegroup Name   
-----------------------  
PRIMARY  
  
(1 row(s) affected)  

See Also

Metadata Functions (Transact-SQL)
SELECT (Transact-SQL)
sys.filegroups (Transact-SQL)