Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 525
  • Last Modified:

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
0
owlsey
Asked:
owlsey
1 Solution
 
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
 
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
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.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now