Results 1 to 11 of 11
  1. #1
    R O C K Y's Avatar
    R O C K Y is offline Member
    Join Date
    Feb 2009
    Posts
    19
    Rep Power
    0

    Question How to set auto_increment for MYSQL

    Dear all

    i tried to set auto_increment for the primary key "NEWUSERID" for the table
    "newuserregistration" using navicat.

    Database :MySQL
    Database Explorer :Navicat 8 MySQL

    but this does not work.

    problem:
    What i need is whenever user provides all the details for the table "newuserregistration" and clicks on submit a new "NEWUSERID" which acts as a primary key automatically gets filled using the format "A001 ,A002,A003,A004........" and this creates a new record within the table "newuserregistration" represented by the primary key "NEWUSERID"

    Please suggest me any tool/explorer/ or ny idea through which this can be easily achieved.

    waiting for ur reply.............:)

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    What do you mean by "does not work"?

    And auto_increment does work, but you have to do the query properly, of course.

  3. #3
    R O C K Y's Avatar
    R O C K Y is offline Member
    Join Date
    Feb 2009
    Posts
    19
    Rep Power
    0

    Default

    hey man

    its really looking absurd when the problem is specified in detail and someone is asking for irrelevant questions rather than solving the particular problem.....

    anyway

    this one is for you again:
    1.open navicat
    2.open database
    3.open table in design view
    4.try to provide value to Auto Increment under options tab as 1 or anything.
    5.click on save
    6.the value you have entered into AutoIncrement gets invisible and nothing is saved.


    [B]Now my question is :[/B]
    Scenario:Whenever user provides all the details for the table "newuserregistration" and clicks on submit a new "NEWUSERID" which acts as a primary key automatically gets filled using the format "A001 ,A002,A003,A004........" and this creates a new record within the table "newuserregistration" represented by the primary key "NEWUSERID".

    Now can u please suggest me any tool/explorer/ or ny idea through which this i can easily provide the functionality of auto_increment to "NEWUSERID" COLUMN.

    WAITING FOR YOUR REPLY SIR..........:o

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    If you simply want a tool go to mysql.org and ask there.

    If you would care to explain what "does not work" means, we may be able to help you here.

    Post your table description and your query, as well as the code setting off the query, as well as all error/compiler messages you are getting.

    Since we have no idea what you are actually doing, or what errors you are seeing (if any), then how are we to help you?

    Considering the questions placed in this post, maybe you can understand now, that the problem is not well explained, in fact that it is almost not explained at all.

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Once again, if your actual question is about how to make an auto_increment column with a specific format, then ask on a mysql forum, not a java forum, for crying out loud.

  6. #6
    R O C K Y's Avatar
    R O C K Y is offline Member
    Join Date
    Feb 2009
    Posts
    19
    Rep Power
    0

    Default

    "Three grand essentials to happiness in this life are something to do, something to love, and something to hope for."

  7. #7
    GiorgioViklo is offline Member
    Join Date
    Feb 2009
    Posts
    1
    Rep Power
    0

    Default Hello everyone

    Hello,

    I've just desided to register here, so... hello everyone ! :)

  8. #8
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by R O C K Y View Post
    "Three grand essentials to happiness in this life are something to do, something to love, and something to hope for."
    Then I would hope that, and love it if, you figure out how to ask (do) the proper question at the the proper forum.

    After all, it doesn't help much to ask your doctor how you can weave the cloth and create the cement-like powder in order to mkae your cast. I mean, they do use casts so they must know how to make the components, right?

  9. #9
    R O C K Y's Avatar
    R O C K Y is offline Member
    Join Date
    Feb 2009
    Posts
    19
    Rep Power
    0

    Default

    Bitterness is like cancer. It eats upon the host. But anger is like fire. It burns it all clean.

    Hence
    What one has not experienced, one will never understand in print.

  10. #10
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    So what part of all that did you not understand?

  11. #11
    neeraj.singh is offline Member
    Join Date
    Feb 2009
    Location
    Delhi
    Posts
    63
    Rep Power
    0

    Default

    auto_increament is a keyword of mysql to make a field auto increasing..
    the field should be int.

Posting Permissions

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