MySQL Forums
Forum List  »  Newbie

how to add an auto-increment column to and other column
Posted by: marc-antoine yonga
Date: February 28, 2017 10:14AM

Hello,

What is the method to add an auto-increment column associated with the value of an other column to an other column in a default/expression generated column of MySQL WorkBench.

My trying code is :

Id INT AUTO-INCREMENT;
BaseId INT DEFAULT='20170228';
NewId INT;
Default/expression : (NewId = BaseId + Id);

Thanks for your help !

Options: ReplyQuote


Subject
Written By
Posted
how to add an auto-increment column to and other column
February 28, 2017 10:14AM


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.