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 7753099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:58:05+00:00 2026-06-01T11:58:05+00:00

This seems like a fairly obvious question, but I haven’t been able to think

  • 0

This seems like a fairly obvious question, but I haven’t been able to think of the proper term for what I am trying to ask, so coming up with reference material for this has been tricky. The answers seem obvious, though.

When examining the Pluralsight training material for SQL Server, they recommended always referring to tables in both “regular” queries (something you might write for a basic web service) and for a SQL query in perhaps a stored procedure, like the following:

[databasename].[dbo].[some_table].[sometimesacolumngoeshere]

Though I have found it very common to come across stored procs, etc., that simply use:

my_column    or    [my_column]

The difference here is obviously that one provides an absolute “address” explicitly, whereas the other is implicit.

How do you know when it is appropriate to use one over the other, and also what do you call this, addressing?

My preference would be to always be explicit, and if you need to save space and/or make things more clear, you could alias to an explicit full “address”, correct?

  • 1 1 Answer
  • 1 View
  • 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-01T11:58:08+00:00Added an answer on June 1, 2026 at 11:58 am

    You are correct. Basically SQL will attempt to find the field you are looking for “my_column” in all of the tables in your FROM and JOIN sections. If however you happen to have a “my_column” in table A and in table B then you need to explicitly tell it which “my_column” you are looking for by including the table name. This goes on up the chain to dbo and databasename if you have collisions there as well.

    Most of the time you will find that people don’t explicitly call out the tables a column is in unless they are joining multiple tables.

    For example I write my queries like this:

    SELECT a.field1, b.field2
    FROM tableA AS a
    INNER JOIN tableB AS b ON a.id = b.a_id
    WHERE a.id = 123
    

    Here I am using the AS to alias tableA and tableB down to more readable a and b. I could have just as easily written my query like this:

    SELECT tableA.field1, tableB.field2
    FROM tableA
    INNER JOIN tableB ON tableA.id = tableB.a_id
    WHERE tableA.id = 123
    

    Or like this, if field1 and field2 are unique to there tables, but this gets a bit confusing as to where each piece of data is coming from.

    SELECT field1, field2
    FROM tableA
    INNER JOIN tableB ON tableA.id = tableB.a_id
    WHERE tableA.id = 123
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like a fairly straightforward question but I've been unable to find an
This seems like it would be fairly simple, but I've been unable to find
This seems like a basic question, but I haven't found any clear answers. Essentially,
This seems like it should be fairly straight-forward, but I can't see anything obvious.
This seems like a fairly straightforward question, but I couldn't find this particular use-case
This seems like a fairly simple problem to me but I have been having
It seems like this should be fairly obvious, but I can't find anything on
This seems like a pretty softball question, but I always have a hard time
This seems like a simple question, but I can't find it with the Stack
This seems like it should be obvious but I can't figure it out. Suppose

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.