As join command joins 2 tables, is it like changing the schema for it to be considered a DDL?
Asked
Active
Viewed 1,963 times
-1
-
2No, joining is not DDL, it is DML. – Tim Biegeleisen Aug 21 '19 at 02:05
-
2*"join command"* There is no such thing in SQL as a `JOIN` command. `JOIN` is a **clause** used in `SELECT` statements, and as the [second duplicate answer](https://stackoverflow.com/a/44796508/5221149) says, `SELECT` statements are DML. – Andreas Aug 21 '19 at 02:06
-
What do "like changing the schema" & "be considered a DDL" mean? We know what "changing the schema" & "DDL" mean. – philipxy Aug 21 '19 at 06:41
1 Answers
5
JOIN
is not a "command". JOIN
is an operator that operates on two tables (okay, table "equivalents" including views, table values functions, and subqueries). As an operator, it can appear in a FROM
clause or (in MySQL) in UPDATE
and DELETE
clauses as well.
That's it, just an operator. It doesn't change the data structure. It doesn't define the data structure. It is not DDL. It is an operator in the "data manipulation" language (DML) part of SQL. DML includes SELECT
, UPDATE
, and DELETE
.

Nimantha
- 6,405
- 6
- 28
- 69

Gordon Linoff
- 1,242,037
- 58
- 646
- 786