Returns the filegroup name for the given filegroup identification (ID) number.
FILEGROUP_NAME ( filegroup_id )
filegroup_id
Is the filegroup ID number for which to return the filegroup name. filegroup_id is smallint.
nvarchar(128)
filegroup_id corresponds to the groupid column in sysfilegroups.
This example returns the filegroup name for the filegroup ID 1 (the default).
USE master
SELECT FILEGROUP_NAME(1)