# target table

Published articles for target table.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Think About SQL MERGE in Terms of a RIGHT JOIN

DevFeed: [Think About SQL MERGE in Terms of a RIGHT JOIN](<https://devfeed.tech/articles/think-about-sql-merge-in-terms-of-a-right-join-28967.md>)

Original publisher: [Read original article](<https://blog.jooq.org/think-about-sql-merge-in-terms-of-a-right-join/>)

Author: lukaseder

Published: 2025-03-13T14:45:53Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [etl](<https://devfeed.tech/topics/etl.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [databricks](<https://devfeed.tech/tags/databricks.md>), [etl](<https://devfeed.tech/tags/etl.md>), [firebird](<https://devfeed.tech/tags/firebird.md>), [merge](<https://devfeed.tech/tags/merge.md>), [outer-join](<https://devfeed.tech/tags/outer-join.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [right-join](<https://devfeed.tech/tags/right-join.md>), [schema](<https://devfeed.tech/tags/schema.md>), [semantics](<https://devfeed.tech/tags/semantics.md>), [source](<https://devfeed.tech/tags/source.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [statement](<https://devfeed.tech/tags/statement.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [table](<https://devfeed.tech/tags/table.md>), [target-table](<https://devfeed.tech/tags/target-table.md>), [when-matched](<https://devfeed.tech/tags/when-matched.md>), [when-not-matched](<https://devfeed.tech/tags/when-not-matched.md>), [when-not-matched-by-source](<https://devfeed.tech/tags/when-not-matched-by-source.md>)

### AI overview

The article explains SQL MERGE by relating its target-and-source behavior to a RIGHT JOIN. It covers updating matching rows, inserting nonmatching rows, deletion behavior, and the restriction against duplicate matches.

### Source excerpt

RIGHT JOIN is an esoteric feature in the SQL language, and hardly ever seen in the real world, because almost every RIGHT JOIN can just be expressed as an equivalent LEFT JOIN. The following two statements are equivalent: It's not unreasonable to expect these two statements to produce the same execution plan on most RDBMS, ... Continue reading Think About SQL MERGE in Terms of a RIGHT JOIN ->

## Workaround for MySQL's "can't specify target table for update in FROM clause" Error

DevFeed: [Workaround for MySQL's "can't specify target table for update in FROM clause" Error](<https://devfeed.tech/articles/workaround-for-mysql-s-can-t-specify-target-table-for-update-in-from-clause-error-28975.md>)

Original publisher: [Read original article](<https://blog.jooq.org/workaround-for-mysqls-cant-specify-target-table-for-update-in-from-clause-error/>)

Author: lukaseder

Published: 2023-12-20T14:20:29Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [MySQL](<https://devfeed.tech/topics/mysql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [bug](<https://devfeed.tech/topics/bug.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [for-update](<https://devfeed.tech/tags/for-update.md>), [from-clause](<https://devfeed.tech/tags/from-clause.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [mariadb](<https://devfeed.tech/tags/mariadb.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [table](<https://devfeed.tech/tags/table.md>), [target-table](<https://devfeed.tech/tags/target-table.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

The article explains MySQL error 1093, which occurs when an UPDATE statement references its target table in a FROM clause. It presents a jOOQ transformation as a workaround and notes that similar workarounds appear in the MySQL documentation.

### Source excerpt

In MySQL, you cannot do this: The UPDATE statement will raise an error as follows: SQL Error [1093] [HY000]: You can't specify target table 't' for update in FROM clause People have considered this to be a bug in MySQL for ages, as most other RDBMS can do this without any issues, including MySQL clones: ... Continue reading Workaround for MySQL's "can't specify target table for update in FROM clause" Error ->