0

I insert something simple like

insert into table(pri1,pri2,value) values (1,1,1);
insert into table(pri1,pri2,value) values (1,2,1);

And in MySQL 5.6 they show up as:

pri1 pri2 value
1    1     1
1    2     1

BUT

In MySQL 5.1 I do the same thing and they show up as:

pri1 pri2 value
1    2     1
1    1     1

As in the first row is the last row inserted.

Why is this? Ive seen strange things but this is one of the strangest!

2
Contributors
2
Replies
17
Views
3 Years
Discussion Span
Last Post by riahc3
0

It looks as though the data is just being placed at the beginning of the table in MySQL5.1 instead of the end. Unless specified, MySQL will add the inputted data to the end of the table, not the beginning. I don't recall this being different in MySQL 5.1.

How are you calling the information from the database? I'm assuming you're using the same command to call from both like you have done when inserting data?

0

It looks as though the data is just being placed at the beginning of the table in MySQL5.1 instead of the end. Unless specified, MySQL will add the inputted data to the end of the table, not the beginning. I don't recall this being different in MySQL 5.1. How are you calling the information from the database? I'm assuming you're using the same command to call from both like you have done when inserting data?

Your basic command:

select * from table;

I mean, I dont recall this being any different either. Like I said the code is the same except instead of connecting to one database (running on a 5.6 server) I connect to another (running 5.1)...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.