Professional Web Applications Themes

SHOW TABLE STATUS & Autoincrement??? - MySQL

Can someone please tell me what the Auto_increment field in the SHOW TABLE STATUS output means? I checked the online doentation and couldn't get much help. Thanks for your help...

  1. #1

    Default SHOW TABLE STATUS & Autoincrement???

    Can someone please tell me what the Auto_increment field in the SHOW
    TABLE STATUS output means? I checked the online doentation and
    couldn't get much help.

    Thanks for your help

    soup_or_power@yahoo.com Guest

  2. #2

    Default Re: SHOW TABLE STATUS & Autoincrement???

    [email]soup_or_power[/email] wrote:
    > Can someone please tell me what the Auto_increment field in the SHOW
    > TABLE STATUS output means? I checked the online doentation and
    > couldn't get much help.
    Huh? How the hell have you searched?
    [url]http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html[/url]

    Auto_increment
    The next AUTO_INCREMENT value.

    So: the value the next inserted row will get in it's auto_increment field.

    Grtz,
    --
    Rik Wasmus


    Rik Guest

  3. #3

    Default Re: SHOW TABLE STATUS & Autoincrement???

    It means that when no value is supplied for this field, a value is
    automatically inserted - at an increment of the preceding value. Try it
    yourself. Make a table like

    CREATE TABLE `test` (
    `id` INT ( 5 ) NOT NULL AUTO_INCREMENT ,
    `f_name` VARCHAR( 12 ) ,
    `l_name` VARCHAR( 12 ) ,
    PRIMARY KEY ( `id` )
    ) ;

    Insert something like this into your table (where the first value in
    each INSERT statement represents the auto-incremented field) and see
    what you get:

    INSERT INTO table VALUES ('','John'.'Lennon');
    INSERT INTO table VALUES ('','Paul'.'MacCartney');
    INSERT INTO table VALUES ('','George'.'Harrison');
    INSERT INTO table VALUES ('','Ringo'.'Starr');

    strawberry Guest

  4. #4

    Default Re: SHOW TABLE STATUS & Autoincrement???

    It means that when no value is supplied for this field, a value is
    automatically inserted - at an increment of the preceding value. Try it
    yourself. Make a table like

    CREATE TABLE `test` (
    `id` INT ( 5 ) NOT NULL AUTO_INCREMENT ,
    `f_name` VARCHAR( 12 ) ,
    `l_name` VARCHAR( 12 ) ,
    PRIMARY KEY ( `id` )
    ) ;

    Insert something like this into your table (where the first value in
    each INSERT statement represents the auto-incremented field) and see
    what you get:

    INSERT INTO table VALUES ('','John'.'Lennon');
    INSERT INTO table VALUES ('','Paul'.'MacCartney');
    INSERT INTO table VALUES ('','George'.'Harrison');
    INSERT INTO table VALUES ('','Ringo'.'Starr');

    strawberry Guest

Similar Threads

  1. Replies: 0
    Last Post: October 5th, 07:36 PM
  2. show job status
    By Shaun Fryer in forum PERL Beginners
    Replies: 0
    Last Post: October 2nd, 09:48 PM
  3. Show load status in %
    By Esther Lutz in forum Macromedia Dreamweaver
    Replies: 5
    Last Post: July 29th, 01:12 PM
  4. ViewState + AutoIncrement -- Okay; Session + AutoIncrement -- Not okay
    By Gene Gorokhovsky in forum ASP.NET General
    Replies: 0
    Last Post: July 17th, 02:48 PM
  5. Status Table for Cursor
    By .matt in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: June 30th, 08:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139