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 2012 Forums
 Transact-SQL (2012)
 tables show user.tablename

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2014-12-16 : 15:28:54
my new tables I am creating show user.tablename instead of dbo.tablename

the problem is then in my stored procedure I need to put in the user.tablename

how can I change the table names so instead of user.tablename it's the default of dbo.tablename

I want to change the existing tables that I have now

foreverSQL
Starting Member

2 Posts

Posted - 2014-12-16 : 16:12:30
set the defaut schema of user in the database to "dbo" and then create the tables. They will show up as dbo.<tablename>

Cheers
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-12-16 : 16:44:33
To transfer existing tables to dbo schema, do this:
ALTER SCHEMA dbo TRANSFER user.tablename;
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2014-12-17 : 01:16:01
thanks - hwo do i change the default schema
Go to Top of Page
   

- Advertisement -