Home >Database >Mysql Tutorial >浅谈mysql数据库中的using的用法_MySQL

浅谈mysql数据库中的using的用法_MySQL

WBOY
WBOYOriginal
2016-06-01 13:00:401644browse

mysql中using的用法为:

using()用于两张表的join查询,要求using()指定的列在两个表中均存在,并使用之用于join的条件。

示例:

代码如下:


  select a.*, b.* from a left join b using(colA);

  等同于:

代码如下:


  select a.*, b.* from a left join b on a.colA = b.colA;

以上所述就是本文的全部内容,希望大家能够喜欢。

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