SQL Tutorials

How To Change Table Schema Name In SQL 2008

How to Change Table Schema Name In SQL 2008

How to Change Table Schema Name In SQL 2008

 

 

 

 

 

Description:

-After database restored some of the tables schema was changed.Default  dbo.tablename is changed.Due to this change some of the functions are not working.

Solution:

– Log in to the database with the database credentials.
– Expand the database tables.
– Right click on the table (which you want to change the schema name)  and select script database as then select CREATE To and select Create New Query Editor Window.

select script database->CREATE To->New Query Editor Window.

– Once script generate you can find the below lines in the right hand script.

CREATE TABLE [so].[user] [Schema Nme].[Table name]

– Change the schema name and execute the script.
– Now disconnect and connect the database.Check the new changed Schema database table.
– After that select Edit Top 1000 Rows.And copy the data and paste to new changed schema table.

Tags:SQL,SQL 2008,Schema master,Master table,Master database,SQL installation.

About the author

admin

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.