Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
hii am having table like thisstu_id stu_name stu_cla created_Datetime1 AA A2 BB B3 CC Ahere i want to create a trigger to genrate created_Datetime as getdate()how to write a trigger for thisanand
khtan
In (Som, Ni, Yak)
17689 Posts
Posted - 2011-12-29 : 02:04:54
you don't really need trigger. You can use a DEFAULT CONSTRAINT, like