How to rename Column or Table in SQL Server - SQL Server / TSQL Tutorial Part 36

preview_player
Показать описание
SQL Server / TSQL Tutorial Scenario: How to Rename a Column Name or Table Name in SQL Server

Scenario:
You are working as SQL Server developer for Auto Insurance Company. On one of SQL Server Instance, they have Database with name Insurance. In Insurance Database they have table dbo.Customer with below definition.

Create Table Customer
(FirstName VARCHAR(50),
LastName VARCHAR(50),
Age SmallInt,
PhoneNumber CHAR(9),
DOB Date,
Sex CHAR(1)
)
You got the requirement to change the name of Customer table to USCustomers and also change the Sex column Name to Gender. You need to prepare SQL Scripts for QA, UAT and Production.

Link to Scripts used in the video

Check out our website for Different SQL Server, MSBI tutorials and interview questions
such as SQL Server Reporting Services(SSRS) Tutorial
SQL Server Integration Services(SSIS) Tutorial
SQL Server DBA Tutorial
SQL Server / TSQL Tutorial ( Beginner to Advance)
Рекомендации по теме