x
login about faq Site discussion (meta-askssc)

Shortcut key for inserting current date in sql 2005 table

Hi,

In sql server 2000 we can use "ctrl+;" to insert current date in table(Enterprise Manager)
Is there any shortcut key to insert date in Sql server 2005.

Thanks

more ▼

asked Jul 06 '11 at 11:40 PM in Default

sathishkumar gravatar image

sathishkumar
234 15 21 26

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

According to the official keyboard short-cut list, no.

However, you do have the opportunity to define your own keyboard shortcuts within SSMS, as is outlined at the top of the page referenced above. Whether or not you'll be able to create a shortcut to do what you want is another matter.

The alternative is to create the table so that the date/time column has a default value of getdate() on the field (see example 'D' on that link). Of course, that'll only work when inserting a new record. If it's something that needs to be updated on an UPDATE, then you might want to look into creating an update trigger.

more ▼

answered Jul 07 '11 at 12:16 AM

ThomasRushton gravatar image

ThomasRushton ♦
29.3k 6 9 36

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x3

asked: Jul 06 '11 at 11:40 PM

Seen: 959 times

Last Updated: Jul 06 '11 at 11:41 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.