Home > Database > Mysql Tutorial > mysql自联结

mysql自联结

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:37:36
Original
1377 people have browsed it

mysql的 自联结 的处理速度比子查询快了很多。所以自联结还是有必要学习的。 普通的s ql子查询语句 SELECT `id`,`bic` FROM `biao` WHERE `id`=(SELECT `id` FROM `biao` WHERE `id`='9696e'); mysql的自联结sql语句 SELECT `id`,`bic` FROM `biao` AS a, `b

mysql的自联结的处理速度比子查询快了很多。所以自联结还是有必要学习的。
普通的sql子查询语句

SELECT `id`,`bic` FROM `biao` WHERE `id`=(SELECT `id` FROM `biao` WHERE `id`='9696e');
Copy after login

mysql的自联结sql语句

SELECT `id`,`bic` FROM `biao` AS a, `biao` AS b WHERE a.id=b.id AND b.id='9696e';
Copy after login

自联结的sql语句看起来也清爽优美。

Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template