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

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

WBOY
WBOYOriginal
2016-06-01 13:24:581050browse

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

Statement:
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