Jump to content

aysx

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by aysx

  1. just a quick question because it slipped my mind how do you set a default value for a column in mysql? thanks
  2. aysx

    auto_increment

    create table testtable ( id int(4) not null auto_increment, name varchar(30), primary key (id) ) say i add some names to testtable. each name has an id, and the id is auto_increment. i have 50 names. then i decide to delete all the names except the first name i added to the database (that has an id of 1). THEN i add another name to the database. i expect the id of the name to be 2, but instead it\'s... 51. o_O; kind of logical, seeing it\'s the fifty-first name i added to the database, no matter if i deleted the rest. .. but i don\'t WANT it to be 51! i want it to be 2! 1-> 2, not -> 51! -___-; does anyone know if you can fix this? or is this just my computer acting up again X_x;
  3. aysx

    set default

    ummm.. how do you set a default value in a mysql table? i want to change the column brianna so it has a default value of six, but i\'m using alter table clarence alter brianna set default six which doesn\'t seem to work... can anyone tell me why?[/code]
×
×
  • Create New...

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.