Howdy, guys... 😉

I have a question on the MySQL syntax...

CREATE TABLE `something` (
  `pid` int(11) unsigned NOT NULL auto_increment,
  `cid` int(11) unsigned NOT NULL default '0',
  `author` varchar(255) NOT NULL default '',
  `title` varchar(60) NOT NULL default '',
  `description` text NOT NULL,
  `price` float(4,2) NOT NULL default '0.00',
  PRIMARY KEY  (`pid`),
  KEY `cid` (`cid`)
) TYPE=MyISAM [b]AUTO_INCREMENT=5[/b];

At the end, there is this 'AUTO_INCREMENT=5' and I have no idea what that '5' means...

I've googled to see what that one means, but the number doesn't really have any pattern or whatsoever...

Can I just assign whatever number I feel like to and can I have same number repeating when I create multiple tables??? 😕

Can somebody enlighten me??? Thank you very much... 😉

    Ah... Call me dumb... 🙁 I don't know how I have missed that page while I was browsing the site... 🙁

    Now, I think I get that part... So, basically whatever number I put will be the number that database will add to next time for the auto_increase column...

    Thank you very much... 🙂

      Write a Reply...