Solved

keyboard shortcut for timestamp

Posted on 2004-08-20
5
509 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

821 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