Returns the filegroup identification (ID) number for the given filegroup name.
FILEGROUP_ID ( 'filegroup_name' )
'filegroup_name'
Is the filegroup name for which to return the filegroup ID. filegroup_name is nvarchar(128).
smallint
filegroup_name corresponds to the groupname column in sysfilegroups.
This example returns the filegroup ID for the filegroup named default.
USE master
SELECT FILEGROUP_ID('default')