Forum Moderators: open

Message Too Old, No Replies

Primary key format in mysql

pk, mysql

         

ksugam

12:06 am on Jun 7, 2008 (gmt 0)

10+ Year Member



Hello All,
I am trying to create a table in mysql with the format of primary key as 'abc-00001'. i want this to be auto-increment field.
We have a function called "format" in Access where we can specify the format of primary key.
Do we have a similar function in mysql?

Thanks!

coopster

3:39 pm on Jun 7, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member




Some attributes do not apply to all data types.
AUTO_INCREMENT
applies only to integer and floating-point types.

Resource:
[dev.mysql.com...]

However, you can create a compound key. More information here ...
[dev.mysql.com...]