Quantcast
Channel: Geeks Tutor
Viewing all articles
Browse latest Browse all 15

How to set an default value for an existing column in SQL Server ?

$
0
0

If you want to set an default value for an existing column in SQL Server , you can use the ALTER command and specify the CONSTRAINT. How to set an default value for an existing column in SQL Server ? Assume that you have a table called HumanResource.Employee and wish to set the “holiday” column’s default value to 23 . Here’s how you do it. Use AdventureWorks GO ALTER TABLE HumanResource.Employee ADD CONSTRAINT DF_Constraint1 DEFAULT 23 FOR holiday

The post How to set an default value for an existing column in SQL Server ? appeared first on Geeks Tutor.


Viewing all articles
Browse latest Browse all 15

Trending Articles