computer
 






 

Question by  tasquire (29)

How do I create a default date on MS SQL server?

 
+7

Answer by  Tech (34)

Edit the table by right clicking and choose design, configure the Data Type, and enter "(getdate())" for "default value or blinding" for column properties.

 
+7

Answer by  fishy (1085)

If you want to create a default date on a certain database or table, this can be done using the query portion of SQL server manager.

 
+6

Answer by  Rafar (46)

If you were to create or modify a table column there is an option for a default value, any value (either static or procedure) would go here.

 
+6

Answer by  RandomDan (489)

Usually set as a default value for a field. If you need the current date, use a TIMESTAMP field with a default value of CURRENT_TIMESTAMP. If you need a certain date, simply use that date as the default value. If you are writing a script, simply set a constant in the script and call that in your queries.

 
+5

Answer by  susmipa (48)

Create the table with required fields. Among them one field must be with date/time data type. For the date/time field, we can use the function getdate() to get the current date.

 
+4

Answer by  Lakshmi65 (715)

while crating table we have to insert a row in which the code is written to display the date by default.

 
+3

Answer by  gigo (1706)

In MS SQL Servers column definition you could write for example the current date: default value = now(). You need the Enterprise Manager to do that.

 
You have 50 words left!