Re: Populating tables
>CID001
Are you limiting yourself to 999 customers?
You could define you table with
CREATE TABLE mytable (
id int(3) auto_increment not null zerofill primary index,
-- other columns ...
...
);
INSERT without specifying the cid, and you'll get the next id.
Then when you SELECT id from mytable do this
SELECT CONCAT('CID',id) cid from mytable ....;
and you'll get CID001, CID002, etc
Good luck,
Barry.
Subject
Written By
Posted
Re: Populating tables
March 23, 2013 08:50PM
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.