Saturday, 17 August 2013

How can I automatically update primary key value in MySQL when an entry is deleted?

How can I automatically update primary key value in MySQL when an entry is
deleted?

I'm using MySQL as database for online examination system. here Question
No. is primary key so, when a question in middle is deleted that number is
wasted,(just like in queue data structure).I want the next question
numbers to be automatically decremented. is it possible by using PHP and
MySQL. If yes, then please write the solution.

No comments:

Post a Comment