MySQL Forums
Forum List  »  Newbie

Re: Re-writing sql code using another column to get same result
Posted by: Peter Brawley
Date: August 07, 2018 08:27AM

The `month` column is entirely redundant, and near-impossible to query as you hope since as a VarChar it's not amenable to date arithmetic.

If you want a verbal month-year readout of `date_field`, write a View or (since 5.7) create a derived (virtual) column.

Options: ReplyQuote




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.