How to Alter Table in SQL Server by using Alter Statement - SQL Server / TSQL Tutorial Part 35

preview_player
Показать описание
SQL Server / TSQL Tutorial Scenario: How to Alter Table in SQL Server by using Alter Statement

Let's say that you are working as SQL Server developer in Mortgage Company. In TechBrotherIT database, there is Dbo.Customer Table with below definition.

Create Table dbo.Customer
(FirstName VARCHAR(50),
LastName VARCHAR(50),
Age TinyInt,
PhoneNumber CHAR(9),
DOB Date,
Sex CHAR(1)
)
You got the requirement in which you have to generate Alter statement for below changes

Add Column Address to Customer Table
Modify column FirstName data type from VARCHAR(50) to VARCHAR(60)
Drop Column Age from Customer Table

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)
Рекомендации по теме