Syntax of FILEGROUP_NAME Function :
FILEGROUP_NAME ( filegroup_id )
filegroup_id is a filegroup identification number. It corresponds to the groupid column in sysfilegroups. It is of type smallint.
Return type of FILEGROUP_NAME function is nvarchar(128).
Examples of FILEGROUP_NAME Function :
Example 1 : Use of FILEGROUP_NAME function in select clause
SELECT FILEGROUP_NAME(1)
Output
PRIMARY
Above example returns filegroup name of filegroup id 1.