aysx
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by aysx
-
-
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;
-
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]
setting default in mysql tables
in MySQL Help
Posted
just a quick question because it slipped my mind
how do you set a default value for a column in mysql?
thanks