428d851913
* refactor: generic rename to mysql * refactor: g4 with mysql syntax * test: mysql syntax * refactor: remove useless keywords * refactor: remove nonReserved keywords * refactor: lint specificFunction --------- Co-authored-by: liuyi <liuyi@dtstack.com>
13 lines
496 B
SQL
13 lines
496 B
SQL
-- https://dev.mysql.com/doc/refman/5.7/en/intersect.html
|
|
|
|
/* query_expression_body INTERSECT [ALL | DISTINCT] query_expression_body
|
|
[INTERSECT [ALL | DISTINCT] query_expression_body]
|
|
[...]
|
|
|
|
query_expression_body:
|
|
See Section 13.2.14, “Set Operations with UNION, INTERSECT, and EXCEPT” */
|
|
|
|
|
|
(SELECT * FROM table_name1) INTERSECT (SELECT * FROM table_name2);
|
|
SELECT column_list FROM table_a WHERE age = 12 INTERSECT SELECT column1, COUNT(column2) FROM table_name GROUP BY column1;
|