CERT_ID
cryptographic transform or key lookup
What changes
- Input
- plaintext or ciphertext and a key, certificate or passphrase
- Output or change
- ciphertext, plaintext, hash, signature check, or key metadata
- Return type
- int
Syntax at a glance
CERT_ID ( 'cert_name' )
Work example
Resolve a certificate name to its database identifier.
Use synthetic data in an isolated database. Follow the existing key hierarchy and keep keys and plaintext out of output.
Check your work A missing or invisible certificate can return null, so confirm permissions and database context.
Open Microsoft Learn for full syntax, permissions, and details for your version.