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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to insert currect date to a datetime column?

Author  Topic 

sqlontherun101
Starting Member

16 Posts

Posted - 2009-10-16 : 05:15:37
Hi,

I column in my table that has insertedTime as a column, i want to set this column to insert the current time in an entry of data to it. I need SQL to insert current date automatically to the column.

How do i do it?

I know GetDate() returns the currect datetime. I use
"SQL server management studio express" to design tables.
How do i set this GetDate() assiged as a forumula to InsertedTime column from the SQL Management studio?

TY

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-16 : 05:50:52
select the column
At the bottom type getdate() in the row that reads Default value or Binding

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -