motioneye
asked on
SQL queries to include Yes or No for the outputresults
Anyone can help me with below queries when the result found empty, it should return with database name and status as Yes or No.
EXEC sp_MSforeachdb 'USE ?
SELECT db_name() AS Database_Name, name AS Key_Name
FROM sys.asymmetric_keys
WHERE key_length < 2048
AND db_id() > 4;'
EXEC sp_MSforeachdb 'USE ?
SELECT db_name() AS Database_Name, name AS Key_Name
FROM sys.asymmetric_keys
WHERE key_length < 2048
AND db_id() > 4;'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
when the result found emptyPlease defina an empty result since database name can't be an empty string.
Open in new window