469,088 Members | 1,236 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,088 developers. It's quick & easy.

Table Qualification in SQL Server 2000

Is there any way to set up a User in SQL Server so they DO NOT have to
qualify a table name with the owner name in a Select statement?
Jul 20 '05 #1
3 1816
try this: SELECT * FROM [DatabaseName]..[TableName]
"Mike Johnson" <mj******@rsimail.com> wrote in message
news:45**************************@posting.google.c om...
Is there any way to set up a User in SQL Server so they DO NOT have to
qualify a table name with the owner name in a Select statement?

Jul 20 '05 #2
If the table is owned by the user then the user doesn't need to specify the
owner name.

Unless you have a good reason to do otherwise, create all your tables with
DBO ownership. That way you'll never need to specify the owner name.

--
David Portas
SQL Server MVP
--
Jul 20 '05 #3
Mike Johnson (mj******@rsimail.com) writes:
Is there any way to set up a User in SQL Server so they DO NOT have to
qualify a table name with the owner name in a Select statement?


Depends. If the tables are owned by dbo, and the users do not own
tables themselves, there is no need to specify the username.

However, Microsoft recommends using two-part names as best practice. At
least for loose SELECT statement there is a performance gain to
specify "dbo.", since SQL Server does not have to look for tables owned
by the users themselves.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dan Caron | last post: by
1 post views Thread by php newbie | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.