FILEGROUP_ID (Transact-SQL)FILEGROUP_ID (Transact-SQL)
SQL Server (ab 2008)
Azure SQL-Datenbank
Azure SQL Data Warehouse
Parallel Data Warehouse
SQL Server (starting with 2008)
Azure SQL Database
Azure SQL Data Warehouse
Parallel Data Warehouse
Gibt die Dateigruppen-ID für einen angegebenen Dateigruppennamen zurück.Returns the filegroup identification (ID) number for a specified filegroup name.
Transact-SQL Syntax Conventions (Transact-SQL-Syntaxkonventionen)
Transact-SQL Syntax Conventions
SyntaxSyntax
FILEGROUP_ID ( 'filegroup_name' )
ArgumenteArguments
'filegroup_name'' filegroup_name '
Ein Ausdruck vom Typ sysname für den Namen der Dateigruppe, für die die Dateigruppen-ID zurückgegeben werden soll.Is an expression of type sysname that represents the filegroup name for which to return the filegroup ID.
RückgabetypenReturn Types
intint
RemarksRemarks
filegroup_name entspricht der name-Spalte der sys.filegroups-Katalogsicht.filegroup_name corresponds to the name column in the sys.filegroups catalog view.
BeispieleExamples
Im folgenden Beispiel wird die Dateigruppen-ID für die Dateigruppe mit dem Namen PRIMARY
in der AdventureWorks2012AdventureWorks2012-Datenbank zurückgegeben.The following example returns the filegroup ID for the filegroup named PRIMARY
in the AdventureWorks2012AdventureWorks2012 database.
SELECT FILEGROUP_ID('PRIMARY') AS [Filegroup ID];
GO
Im Folgenden finden Sie das Resultset.Here is the result set.
Filegroup ID
------------
1
(1 row(s) affected)
Weitere Informationen finden Sie unterSee Also
FILEGROUP_NAME (Transact-SQL) FILEGROUP_NAME (Transact-SQL)
Metadata Functions (Transact-SQL) (Metadatenfunktionen (Transact-SQL)) Metadata Functions (Transact-SQL)
sys.filegroups (Transact-SQL)sys.filegroups (Transact-SQL)