How to alter column nvarchar length without droping table in SQL Server?

beginer
beginer
1544 Points
52 Posts

I'm trying to generate alter script for nvarchar length change from MSQL Server Management Studio. But it's generating script including recreation of the table. I don't want to script with regeneration of exiting table.

How to alter column nvarchar length without droping table in SQL Server?

Views: 137
Total Answered: 1
Total Marked As Answer: 0
Posted On: 28-Aug-2024 00:43

Share:   fb twitter linkedin
Answers
Priya
Priya
1152 Points
33 Posts
         

We can directly execute alter command like:

ALTER TABLE [table-name] ALTER COLUMN [column-name] nvarchar([length]) NOT NULL;
Posted On: 29-Aug-2024 21:25
 Log In to Chat