Autoincrement Sequence with String and number
665974Oct 19 2008 — edited Oct 19 2008Hi,
I have a db for a small company where there are different kinds of employees.
As a primary key of each table (for each type of employee), I would like to have a combination of a string and integer.
e.g. if the employee is a car mechanic then the primary key should be something like: CM001, CM002, ....
if the employee is from the it department then the primary key should be like: IT001, IT002, ....
I have found a few script for sequences and triggers to use the auto-increment, but I could not find anything about concatenating a string in front of the integer.
any help appreciated.
thanks