hello friend i just wanna learn if a way exist to generate AUTO_INCREMENT i have my datble and the colum ID is an AUTO_INCREMENT and the id is from 1, 2, 3 .... i would like to diferent id for exemple : CC13445356 i want 2 letter at begin or 3 and 6 number and i dont want write it every time i want a AUTO_INCREMENT do that for me i use phpmyadmin
chrisschristou
0
Posting Whiz
Recommended Answers
Jump to PostAn auto increment column MUST be integer, so you cannot use
cc123
, but you can create composite indexes, so you can create unique content, for example:create table mytest( id int unsigned auto_increment, code varchar(3) not null, message text, primary key (code, id) ) engine = …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.