MySQL Forums
Forum List  »  MySQL Workbench

Re: Bug in DEFAULT expr in column definition of Create table?
Posted by: Peter Brawley
Date: June 06, 2019 11:24AM

> an expression used as a DEFAULT must be surrounded by parentheses (to distinguish it from literals)

?! A default value in most cases is a literal. Parens are needed only when the expression in other contexts requires parens, eg dates & strings but not numerics, see https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html

Let's see the Create Table code.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Bug in DEFAULT expr in column definition of Create table?
133
June 06, 2019 11:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.