Ste*_*veC 3 t-sql sql-server sql-server-2008
如何检查SQL Server实例中是否已存在凭据,以避免在运行时出现错误DROP CREDENTIAL?
通常我使用SSMS中的SCRIPT AS ...and DROP And CREATE To功能来创建脚本,但是CREDENTIAL没有该选项
if exists (select * from sys.credentials where name = 'CredName')
drop credential CredName
Run Code Online (Sandbox Code Playgroud)