Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe to WebmasterWorld
MYSQL table NOT sorted create jacka msg:4428484 9:38 am on Mar 13, 2012 (gmt 0) Hi I wish to create a table. using MYSQL and which content of one field will be imported from an external file. I wish to always be able to keep its original format of this field, i.e I can always recreate the original order in the data was entered, even after some sorting of various other fields. Will be very grateful for your help
rocknbil msg:4428638 3:41 pm on Mar 13, 2012 (gmt 0)
If you use an auto_increment field, it will increment that field in the order you insert it and if it's set as the primary key will be the default sorting. So record 1 record 2 record 3 record 4 create table test (id int(11) primary key auto_increment, textfield text) then via automation or import or whatever, insert into test (textfield) values ('record 1'); insert into test (textfield) values ('record 2'); insert into test (textfield) values ('record 3'); insert into test (textfield) values ('record 4'); should produce 1|record 1 2|record 2 3|record 3 4|record 4 so select textfield from test (without ordering) should output them in that order.