next Posted July 12, 2008 Share Posted July 12, 2008 i'm trying to create a table, but get an error at this line for some reason: date_registered DATE DEFAULT(CURRENT_DATE) says i have a syntax error. Any ideas how to fix this? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted July 12, 2008 Share Posted July 12, 2008 I am guessing that if you would actually post the error or read what it says that it mentions something about not being able to use a function as a default value... The DEFAULT value clause in a data type specification indicates a default value for a column. With one exception, the default value must be a constant; it cannot be a function or an expression. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE. The exception is that you can specify CURRENT_TIMESTAMP as the default for a TIMESTAMP column. See Section 10.3.1.1, “TIMESTAMP Properties”. Quote Link to comment Share on other sites More sharing options...
next Posted July 12, 2008 Author Share Posted July 12, 2008 it just said that i have a syntax error at line 6, nothing specific. Thanks for your help, i'll use TIMESTAMP instead. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.