Retrieve default user database

  • Is there a way to retrieve the user's default database ?


    Jean-Luc
    www.corobori.com

  • Is this correct:

    SELECT dbo.sysdatabases.name

    FROM dbo.sysxlogins INNER JOIN

    dbo.sysdatabases ON dbo.sysxlogins.dbid = dbo.sysdatabases.dbid

    WHERE (dbo.sysxlogins.name = N'myusername')


    Jean-Luc
    www.corobori.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply