dimanche 14 juin 2015

Id in database using qt

I am new to qt. I have created a table in sql, and what I'm trying to do is to give an id whenever user adds data. For the first thing inserted it will be 1, second 2 and so on. So how to check what number was the last one? Should I create query.prepare(sql statement) or is there other way?

Aucun commentaire:

Enregistrer un commentaire