Home > Database > Mysql Tutorial > body text

mysql-MySQL内连接查询结果的显示顺序

WBOY
Release: 2016-06-06 09:41:45
Original
1551 people have browsed it

mysqlselect查询数据库显示

表fruits的字段f_id为primary key

表suppliers的字段s_id为primary key与fruits的s_id有相同的数据类型

然后使用这句查询语句:
1、select suppliers.s_id,s_name,f_name,f_price from suppliers inner join fruits on suppliers.s_id=fruits.s_id;
查询的都结果显示如下:

2、变换表的位置再查询:
select suppliers.s_id,s_name,f_name,f_price from fruits inner join suppliers on fruits.s_id=suppliers.s_id;
得到的结果是一样我没有异议,两次的查询结果s_id显示的顺序为什么是按照fruits.s_id的表中保存的顺序一样,请问这个显示的顺序是按照什么方法定义的?

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!