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
 General SQL Server Forums
 New to SQL Server Programming
 Excuse me for this silly question?

Author  Topic 

ZarrinPour
Yak Posting Veteran

66 Posts

Posted - 2007-11-27 : 00:24:45
Hi all
As far as i know there is no diffrence between the two followings
Sql Statements:

1) Select * from Pubs.dbo.authors
2) Select * From Pubs..authors

i just want to be extra sure about this issue that whan we omit
the OWNER section, sqlserver use the CURRENT USER? am i right?

Thanks in advance.
Regards.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-27 : 01:25:54
Yes, sql checks object under current user's schema then dbo schema. Therefore, those two queries may return different results if there is another authors table in another schema (owned by another user in sql2k).
Go to Top of Page
   

- Advertisement -