How to make auto number increment?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alvindra Pratama
le 2 Juin 2016
Commenté : Alvindra Pratama
le 2 Juin 2016
I have a GUI like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165611/image.png)
I want to make automatic number every time I select a photo from the browse button, where each number that will continue to sequence. For example for the first data I stored to MySQL database, has ID 1, for the second data I stored to then have a MySQL database ID 2, and so on, each number will be increased so that no duplicate numbers. Can anyone help me for this case?
0 commentaires
Réponse acceptée
Joel Marchand
le 2 Juin 2016
I believe that this feature is built into MySQL. MySQL increments an index with each next entry, and this can be queried as any other data column. See the following link for an example of how to achieve this. http://dev.mysql.com/doc/refman/5.7/en/example-auto-increment.html
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Database Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!