Home > Database > Mysql Tutorial > MySql实现跨表查询的方法详解_MySQL

MySql实现跨表查询的方法详解_MySQL

WBOY
Release: 2016-06-01 13:24:58
Original
1055 people have browsed it

bitsCN.com
SELECT c.id, c.order_id, c.title, c.content, c.create_time, o.last_pic FROM `orders` o , `case` c WHERE c.order_id = o.order_id ORDER BY c.id DESC LIMIT 15;

关于跨表提取字段的方法!
利用order_id相同字段,提取case中的id,order_id,title,content,create_time;orders表中的last_pic字段
bitsCN.com

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