Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:49:07+00:00 2026-06-12T03:49:07+00:00

In database Design the user of ‘fed’ compared with login ‘fed’. USE [Design] SELECT

  • 0

In database Design the user of ‘fed’ compared with login ‘fed’.

USE [Design]
SELECT l.name AS login_name, p.name AS [user_name]
FROM sys.sql_logins l JOIN sys.database_principals p ON l.SID = p.SID
WHERE l.name = 'fed'

enter image description here

Why the request under login of ‘fed’ on the Design database select ‘dbo’

USE [Design]
SELECT USER AS user_name

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:49:09+00:00Added an answer on June 12, 2026 at 3:49 am

    Read this first: CREATE USER

    You are confusing LOGIN with USER. Your first query is inspecting LOGIN information, whereas the second is looking at USER. Multiple LOGINs can map to a single USER, which makes things easier to manage, such as administrators all mapped to the database-owner user ‘dbo’.

    EDIT
    Just to clarify, just because you named the column as user_name p.name AS [user_name] doesn’t mean it is. You’re linking via sys.sql_logins, so the ‘principal’ that you are retrieving is the login object, who’s name property is obviously the login name, not the user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As I understand from this database design question , you should use nullable fields
Here's my database design: USER SKILLS id idUser email 1-------* description name selfAssesedLevel lastname
I have the following database design: Employee Table: Username, Name, DivisionCode Division Table: SapCode,
I have the following database design: Employee Table: Username, Name Quiz Table: QuizID, Title,
I design my database incorrectly, should I fix this while its in development? user
I'm thinking on new design for database. And I want to use Table-Per-Type inheritance
So, not having come from a database design background, I've been tasked with designing
this is my database design for a ques n ans page. A user can
Currently my database design is not normalised. When a user visits the website all
Quick question regarding database design; Given I'm storing User data in a database, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.