Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 2.14 KB

File metadata and controls

64 lines (50 loc) · 2.14 KB
title CERT_ID (Transact-SQL)
description CERT_ID (Transact-SQL)
author VanMSFT
ms.author vanto
ms.date 07/24/2017
ms.service sql
ms.subservice t-sql
ms.topic reference
ms.custom
ignite-2025
f1_keywords
CERT_ID
CERT_ID_TSQL
helpviewer_keywords
identification numbers [SQL Server], certificates
CERT_ID function
IDs [SQL Server], certificates
certificates [SQL Server], IDs
dev_langs
TSQL
monikerRange =azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric-sqldb

CERT_ID (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance FabricSQLDB]

This function returns the ID value of a certificate.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: 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