MySQL Incrementing ID/UUID Question -


i'm attempting create table incremental id. isn't simple id auto_increment. in fact, exact id i'm trying work is:

test.script.1/person.n (where n incrementing number)

specifically, have table structured as:

id | fname | lname | gender | age |

each person add in, wish have , incremental id. person 1, test.script.1/person.1 , test.script.1/person.2 second entry , on , forth.

is possible this? have searched while in google, not think searching right thing. apologies if there isn't information, , simple question, don't know for. please advise.

thanks guys!

you can use autoincrementing field trigger populate actual field wish use reference.

something this:

create trigger set_my_uuid after insert on mytable each row begin set new.uuid_ref_col = concat('test.script.1/person.', new.my_auto_increment_col) end ; 

where my_auto_increment_col standard autoincrement column in table.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -