Joke Collection Website - Bulletin headlines - sql default value

sql default value

The default value can be written according to the data type format

What needs to be emphasized is the date. For example, if you define "YYYY-MM-DD", then when you write the default value, For example, if you use January 1, 2006 as the default value, you should write it in the 2006-01-01 format. For other values, such as defining it as an integer, you cannot write fractions in the default value. In other words, the default value writing format and data type Constraints are consistent.

(getdate()) can also be written as getdate(), but it cannot be written as 'getdate()', because the quotation marks represent a string instead of a function.

Chinese characters are character types and need to be enclosed in quotation marks.