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 2005 Forums
 Transact-SQL (2005)
 Removing dbo from table name

Author  Topic 

CSharpNewbie
Starting Member

39 Posts

Posted - 2010-03-02 : 14:16:45
Hi, how can I remove dbo from my sql table prefix?

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-03-02 : 14:26:57
You can't. dbo is the owner of the object, or the schema to which the table belongs. You can change the schema to which it belongs, though.

Jim

P.S.
You don't always have to reference the table has dbo.TableName, but it's a good idea.



Everyday I learn something that somebody else already knew
Go to Top of Page

CSharpNewbie
Starting Member

39 Posts

Posted - 2010-03-02 : 14:48:55
How can I change the schema? This is SQL 2005
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-03-02 : 14:53:28
ALTER newSchema TRANSFER dbo.TableName

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -