When you insert anything into a table without the column 'id' specified, it will auto increment on its own. For example:
Code:
INSERT INTO `npc_types` (`name`) VALUES ('Test');
This query will insert an NPC at the next ID available, so if 999333 is your max, this NPC will become 999334.