Transact-SQL Reference

FILEGROUP_ID

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

Syntax

FILEGROUP_ID ( 'filegroup_name' )

Arguments

'filegroup_name'

Is the filegroup name for which to return the filegroup ID. filegroup_name is nvarchar(128).

Return Types

smallint

Remarks

filegroup_name corresponds to the groupname column in sysfilegroups.

Examples

This example returns the filegroup ID for the filegroup named default.

USE master
SELECT FILEGROUP_ID('default')

See Also

Control-of-Flow Language

DELETE

INSERT

Metadata Functions

SELECT

UPDATE

WHERE