Categories
Sql Server

Default Constraint In SQL Server

Default Constraint In SQL Server DEFAULT constraint is used to insert a default value into a column ,that is predefined by us. Query to create a DEFAULT constraint:- CREATE TABLE sales_order ( Id int NOT NULL, O_No int NOT NULL, OrderDate date DEFAULT GETDATE(),city varchar(50) ) Create a default constraint in already created table:- ALTER […]