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.
| Author |
Topic |
|
Habibjee
Starting Member
2 Posts |
Posted - 2006-05-15 : 03:15:40
|
| What is the script to insert system date in a table at insertion time using trigger. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-15 : 03:20:11
|
| Insert into yourTable (datecol) Select Getdate()Otherwise define that column to have getdate() as default valueMadhivananFailing to plan is Planning to fail |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2006-05-15 : 03:21:54
|
| Why use a trigger ? Why not just add GetDate() as a default value ?Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
|
Habibjee
Starting Member
2 Posts |
Posted - 2006-05-15 : 05:05:52
|
| Just to get an Idea that how values to be inserted using triggers |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-15 : 05:50:32
|
| Read about Triggers in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|