Ngoc Duy
Ngoc Duy

Reputation: 89

How to change prefix table in SQL Server?

I have DataBase Name: PMKIT, prefix Table : PMKIT.TableName.I want rename PMKIT.TableName to DBO.TableName. Can you help me!

enter image description here

Upvotes: 1

Views: 5125

Answers (1)

Vahid Farahmandian
Vahid Farahmandian

Reputation: 6564

You need to transfer your table from PMKIT schema to dbo schema:

ALTER SCHEMA dbo TRANSFER PMKIT.TableName;  

Read more here: https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-schema-transact-sql?view=sql-server-2017

Or you can follow these steps to perform the same action via Management Studio user interface

  1. Right click on your table and select Design
  2. In Design view, open the properties window(Simply hit the F4 key on keyboard)
  3. Find the Schema property and change it
  4. Save your changes, and close the Design view

Upvotes: 2

Related Questions