keyboard shortcut for timestamp

hi all-

in enterprise mngr- you can hit ctrl+(somekey) to insert a null value

is there a key combo for timestamp?

thanks,
duncan
owlseyAsked:
Who is Participating?
 
Scott PletcherSenior DBACommented:
Timestamp is not a datetime format.  You don't need to (and can't, I think) specify a default for a timestamp column.  I also don't know of a shortcut for it.

CURRENT_TIMESTAMP, on the other hand, is equivalent to GETDATE().  
0
 
osullilCommented:
To enter a value of NULL in Enterprise Manager use Ctrl+0.  

If you want to a timestamp to be entered automatically in a column when a new row is entered without having to enter a value then you can set the default value for the column to getDate() in table design view.
0
 
owlseyAuthor Commented:
ok- but is there  a key combo like ctrl+0?
0
 
osullilCommented:
Not that I know of, although I am open to correction.

The default value will work for all new entries, and an update query can be used to update the existing values along the lines of:
UPDATE Table
SET ColumnName=getdate()
WHERE ColumnName IS NULL
0
 
ibostCommented:
How about if you type in GetDate() once, then select it, copy it, and now you can use CTRL-V for your key combo ;-)


-Ian
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.