|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Having problem with MySQL DDL!
Does anyone know how to set default year value in the MySQL YEAR column? The default year value I wish to set is current year. The following CREATE DDL is not working properly. It merely returns zero '0'.
............ `CYEAR` YEAR NOT NULL DEFAULT 'YEAR(CURDATE())' ........... Please give me some clues. P.S/ I'm currently using MySQL 4 and Control Center. |
|
#2
|
||||
|
||||
|
In general, MySQL requires that default values be constants ... so setting the default value to NOW() or CURDATE() won't work.
However, from what I understand, Timestamp's default value is NOW() Although I haven't used it myself. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Having problem with MySQL DDL! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|