Note
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
SQL database in Microsoft Fabric
This function returns the ID value of a certificate.
Transact-SQL syntax conventions
Syntax
CERT_ID ( 'cert_name' )
Arguments
' cert_name '
The name of a certificate in the database.
Return types
int
Remarks
The sys.certificates catalog view shows certificate names.
Permissions
Requires appropriate permission(s) on the certificate, and requires that the caller has not been denied VIEW DEFINITION permission on the certificate. See CREATE CERTIFICATE (Transact-SQL) for more information about certificate permissions.
Examples
This example returns the ID of a certificate named ABerglundCert3.
SELECT Cert_ID('ABerglundCert3');
GO
See also
sys.certificates (Transact-SQL)
CREATE CERTIFICATE (Transact-SQL)
Encryption Hierarchy