Solved

keyboard shortcut for timestamp

Posted on 2004-08-20
5
506 Views
Last Modified: 2012-05-05
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
Comment
Question by:owlsey
5 Comments
 
LVL 1

Expert Comment

by:osullil
ID: 11852433
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
 

Author Comment

by:owlsey
ID: 11852469
ok- but is there  a key combo like ctrl+0?
0
 
LVL 1

Expert Comment

by:osullil
ID: 11852552
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
 
LVL 10

Expert Comment

by:ibost
ID: 11853215
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
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 50 total points
ID: 11856126
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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now