-
Notifications
You must be signed in to change notification settings - Fork 664
Using
Mathias Rangel Wulff edited this page Jun 12, 2015
·
4 revisions
Syntax:
FROM table1 JOIN table USING column1, column2, ...
This USING
clause is equivalent of the next ON clause:
FROM table1 JOIN table
ON table1.column1 = table2.column1
AND table1.column2 = table1.column2
In AlaSQL you can use USING
clause like in this example:
CREATE TABLE one (a INT, b INT);
INSERT INTO one VALUES (1,10),(2,20);
CREATE TABLE two (a INT, c INT);
INSERT INTO two VALUES (1,100),(2,200);
SELECT one.a, b, c FROM one JOIN two USING a;
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo