We Have atable named "User_General_Info" . Then If we need to Add a column to the table with a default date(e,g, System Date) then we can write in this way....
ALTER TABLE [User_General_Info]
ADD Reg_Date datetime
CONSTRAINT DF_User_General_Info_Reg_Date DEFAULT (getdate()) NOT NULL
ALTER TABLE [User_General_Info]
ADD Reg_Date datetime
CONSTRAINT DF_User_General_Info_Reg_Date DEFAULT (getdate()) NOT NULL
No comments:
Post a Comment