MySQL Forums
Forum List  »  Newbie

Re: Displaying
Posted by: Chris Stubben
Date: March 28, 2005 10:04PM

Sure, you can use zerofill with sequences

Chris

mysql> create table tmp(id int(6) unsigned zerofill not null auto_increment primary key, a char(1));
Query OK, 0 rows affected (0.01 sec)

mysql> insert into tmp (a) values ('a'), ('b'), ('c');
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0

mysql> select * from tmp;
+--------+------+
| id | a |
+--------+------+
| 000001 | a |
| 000002 | b |
| 000003 | c |
+--------+------+

Options: ReplyQuote


Subject
Written By
Posted
March 28, 2005 07:51AM
March 28, 2005 08:22PM
Re: Displaying
March 28, 2005 10:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.