返回當(dāng)前數(shù)據(jù)庫中給定邏輯文件名的文件標(biāo)識 (ID) 號。
FILE_ID ( 'file_name' )
'file_name'
要返回其文件 ID 的文件的名稱。file_name 為 nchar(128)。
smallint
file_name 對應(yīng)于 sysfiles 中的 name 列。
下例返回 master 數(shù)據(jù)庫的文件 ID (1)。
USE master相關(guān)文章
SELECT FILE_ID('master')