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 |
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-02-20 : 00:22:25
|
| How can I insert sysdate directly into table while inserting other valuesMalathi Rao |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2007-02-20 : 00:44:06
|
| set default on the column as getdate()or insert into table (Datecolumn)values (getdate()) |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-20 : 00:45:39
|
| INSERT TargetTable (...)SELECT GETDATE(), ...[FROM SourceTable]Peter LarssonHelsingborg, Sweden |
 |
|
|
yonabout
Posting Yak Master
112 Posts |
Posted - 2007-02-20 : 08:21:16
|
| What's the difference between Getdate() and Current_timestamp()?Cheers,Yonabout |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-02-20 : 08:25:44
|
none.Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-02-20 : 08:26:04
|
According to BOL, same.quote: CURRENT_TIMESTAMPReturns the current date and time. This function is equivalent to GETDATE().
KH |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-20 : 08:30:08
|
| And in SQL 2005 SP2 BoL,"This function is the ANSI SQL equivalent to GETDATE"Peter LarssonHelsingborg, Sweden |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-20 : 08:32:35
|
Found this in BOL SP2 RTM,quote: Security Note: Before you call EXECUTE with a character string, validate the character string. Never execute a command constructed from user input that has not been validated. For more information, see SQL Injection.
Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|