---
title: "SQL JOIN Example: Using Vs. ON This is the Difference"
description: "Two top methods to JOIN tables with Using and ON. Here are useful SQL queries to understand quickly."
url: https://srinimf.com/2020/01/29/sqlquery-joins-how-to-write-with-using/
date: 2020-01-29
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2020/01/pexels-photo-1438081.jpeg?fit=1880%2C1255&ssl=1
categories: ["SQL"]
tags: ["Ideas on Using Vs ON sql", "SQL Joins", "SQL JOINS Query with Using", "SQL Using Clause"]
type: post
lang: en
---

# SQL JOIN Example: Using Vs. ON This is the Difference

Here are the differences between **Using **and **ON in Jo[in SQL query](https://srinimf.com/2013/09/06/db2-multi-row-insert-into-a-table/)**. Here are two sample tables – **Customer_table** and **Order_table. You can see sample SQL to join these tables using both ** USING and ON.

Here the joining method is INNER JOIN ( joining is based on matching column of both the tables).

## How to use **Using **to in SQL query to Join tables

Here join condition is customer_number.

```
SELECT
  Customer_Number
 ,Customer_Name
 ,Order_Number
 ,Order_Total
FROM   Customer_Table
INNER JOIN
        Order_Table
Using (Customer_Number) ;
```

Here the ‘using, clause works as ‘on’. So the joining happens based on the column name given in the using clause.

## How to use **ON** in SQL query to Join Tables

```
SELECT
  Customer_Number
 ,Customer_Name
 ,Order_Number
 ,Order_Total
FROM   Customer_Table a
INNER JOIN
        Order_Table b
ON a.Customer_Number = b.Customer_Number;
```

Here the ‘ON’ clause is used to join tables.

### Differences Between USING and ON

In the Using, you can give multiple columns in simple way:

```
using(col1, col2, col3)

In the case of ON:

ON a.col1=b.col1
AND a.col2=b.col2;
```

**Related Posts**

- [SQL Inner JOIN By Two Columns Tricky Example](https://srinimf.com/2020/05/24/how-to-write-query-to-join-tables/)DateMay 24, 2020
- [How to Write Complex SQL Sub-query](https://srinimf.com/2021/11/29/how-to-write-complex-sql-sub-query/)DateNovember 29, 2021
- [How to Join 3 Tables—Without Join Keyword](https://srinimf.com/2021/04/24/how-to-sql-query-to-join-three-tables/)DateApril 24, 2021

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2020%2F01%2F29%2Fsqlquery-joins-how-to-write-with-using%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2020%2F01%2Fpexels-photo-1438081.jpeg%3Ffit%3D1200%252C801%26ssl%3D1&description=SQL%20JOIN%20Example%3A%20Using%20Vs.%20ON%20This%20is%20the%20Difference)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2020/01/29/sqlquery-joins-how-to-write-with-using/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2020/01/29/sqlquery-joins-how-to-write-with-using/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2020/01/29/sqlquery-joins-how-to-write-with-using/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2020/01/29/sqlquery-joins-how-to-write-with-using/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20SQL%20JOIN%20Example%3A%20Using%20Vs.%20ON%20This%20is%20the%20Difference&body=https%3A%2F%2Fsrinimf.com%2F2020%2F01%2F29%2Fsqlquery-joins-how-to-write-with-using%2F&share=email)
-

### Like this:

Like Loading…
