ASYMKEY_ID (Transact-SQL)
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Returns the ID of an asymmetric key.
Transact-SQL syntax conventions
Syntax
ASYMKEY_ID ( 'Asym_Key_Name' )
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Arguments
Asym_Key_Name
The name of an asymmetric key in the database.
Return types
int
Permissions
Requires appropriate permission(s) on the asymmetric key, and requires that the caller has not been denied VIEW permission on the asymmetric key. See CREATE ASYMMETRIC KEY (Transact-SQL) for more information about asymmetric key permissions.
Examples
This example returns the ID of asymmetric key ABerglundKey11
.
SELECT ASYMKEY_ID('ABerglundKey11');
GO
See also
CREATE ASYMMETRIC KEY (Transact-SQL)
ALTER ASYMMETRIC KEY (Transact-SQL)
DROP ASYMMETRIC KEY (Transact-SQL)
SIGNBYASYMKEY (Transact-SQL)
VERIFYSIGNEDBYASYMKEY (Transact-SQL)
Encryption Hierarchy
sys.asymmetric_keys (Transact-SQL)
Security Catalog Views (Transact-SQL)
ASYMKEYPROPERTY (Transact-SQL)
KEY_ID (Transact-SQL)
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho