Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

keyboard shortcut for timestamp

Posted on 2004-08-20
5
Medium Priority
?
522 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 70

Accepted Solution

by:
Scott Pletcher earned 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
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…
Suggested Courses

810 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