newbie-569492
Right there with Babe
Points: 730
More actions
February 7, 2008 at 6:50 am
#186422
I ran the following to view all guest accounts on my db:
EXEC sp_MSforeachdb 'USE [?];
SELECT * FROM sysusers;'
GO
How can I modify this so that it shows me in the result set which database it is referring to?
Greg Charles
SSC-Forever
Points: 45403
February 7, 2008 at 10:37 am
#776106
Add DB_NAME() to the SELECT list like this:
SELECT DB_NAME(), * FROM sysusers;'
Greg
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply