Home > Database > Mysql Tutorial > mysql 两张表关联查询问题

mysql 两张表关联查询问题

WBOY
Release: 2016-06-06 09:38:45
Original
1242 people have browsed it

mysqlsql数据

现在有表A大概是百万级的数据,表B只有几千行,但是想在查询表A里剔除掉表B的数据,SELECT * FROM A WHERE NOT EXISTS (SELECT 1 FROM B WHERE B.id = A.id),这种写法效率很低,请问有没有其他的解决方法?

Related labels:
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