hey i am creating an application for invoicing(computer generated bill).
i have a table sales_log where ref no. column is set to auto_increment.i didnt assign the start value. i mean if the ref no. of 1st bill is 101 then i should automatically get 102..103…etc for the rest…i just dont know how to alter the table constraint and set a starting value for that column.
here is the description of my table
mysql> desc sales_log;
+----------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------+------+-----+---------+----------------+
| date | date | YES | | NULL | |
| item_id | int(11) | YES | MUL | NULL | |
| C_Id | int(11) | YES | MUL | NULL | |
| Quantity | double | YES | | NULL | |
| Ref | int(11) | NO | PRI | NULL | auto_increment |
| price | double | YES | | NULL | |
+----------+---------+------+-----+---------+----------------+
See http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html