Jump to content

Archived

This topic is now archived and is closed to further replies.

cameeob2003

Help Figuring Out What A Sertain Strand Does

Recommended Posts

I was wondering what the:

TYPE=MyISAM AUTO_INCREMENT=26 ;

In something like:

[code]CREATE TABLE `news` (
  `id` int(11) NOT NULL auto_increment,
  `picture` text NOT NULL,
  `content` text NOT NULL,
  `title` text NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=26;[/code]

is doing. Im new to SQL so im just trying to get on my feet about it all.

Share this post


Link to post
Share on other sites

That sets the next value of the AUTO_INCREMENT column, typically used in a table dump like that one. So your next value will be 26 in that table. Presumably, there were also 25 lines in the dumpfile, too?

Share this post


Link to post
Share on other sites
Yeah, most mysqldumps produce that line for no reason whatsoever, since MySQL will handle auto-increments all on its own.  However, this is a great way to start at a non-zero value.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.