If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > auto_increment problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-02-04, 07:03
cody7 cody7 is offline
Registered User
 
Join Date: Mar 2004
Posts: 8
auto_increment problem

i have 3 fields in my table and the first field is my primary key which is also
auto_increment when i insert to this table the first data that will appear in my table particularly in my first field is 1 then when i insert again it becomes 2 and so on

my question is how can i make the auto_increment table will have the value
that looks like this

value1
value2
value3
....
value20
....
and so on...


i am using phpMyAdmin...
any help please....
Reply With Quote
  #2 (permalink)  
Old 10-02-04, 07:07
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
you cannot

however, you can always "assemble" this whenever you retrieve data from the table
Code:
select concat('value',autoincrcolumn) as mykey, ...
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On