Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 why select ... from dbo.tablename

Author  Topic 

debradeng
Starting Member

46 Posts

Posted - 2006-10-19 : 21:31:07
select ... from dbo.tablename
and
select ... from tablename

what is the difference and why?

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-10-19 : 23:17:17
in your first example the tablename is qualified by the owner. different users can "own" different tables in the same database with the same name. By qualifiying the name you can save the optimizer some effort of making sure it is devising a plan for the correct table.

"Database Object Owner" is one of many topics in Books Online that talks about it.

Be One with the Optimizer
TG
Go to Top of Page

debradeng
Starting Member

46 Posts

Posted - 2006-10-19 : 23:38:10
Thank you so much TG,very helpful!
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2006-10-20 : 06:45:46
classic interview question #2.

Next one should be "What is first normal form?"

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-21 : 06:36:55
>>Next one should be "What is first normal form?"

My answer would be
Refer this
http://www.datamodel.org/NormalizationRules.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-10-21 : 09:31:14
>>My answer would be Refer this


(I feel so...used)

Be One with the Optimizer
TG
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-21 : 09:37:37
>>(I feel so...used)



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-10-21 : 11:10:18
The next time I interview someone, I'm going to ask them to find all the bugs in this code, tell them they have two minutes, turn over a small egg timer hourglass to start the two minutes, and set there looking impatient with their apparent incompetence while drumming my fingers on the desk. Call it the DBA Stress Test.

Number Table Function
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47685&SearchTerms=Numbers,table






CODO ERGO SUM
Go to Top of Page
   

- Advertisement -