Common SQL Errors

MySQL Error 1393: ER_VIEW_MULTIUPDATE – How to Fix “Can not modify more than one base table through a join”

Galaxy Team
August 7, 2025

<p>MySQL throws ER_VIEW_MULTIUPDATE when an UPDATE or DELETE tries to change more than one underlying table through a join or updatable view.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1393 ER_VIEW_MULTIUPDATE?

<p>MySQL Error 1393 ER_VIEW_MULTIUPDATE appears when a single UPDATE or DELETE targets multiple base tables through a join or view. Limit the statement to one base table or issue separate updates to fix the problem.</p>

Error Highlights

Typical Error Message

Can not modify more than one base table through a join

Error Type

Query Execution Error

Language

MySQL

Symbol

ER_VIEW_MULTIUPDATE

Error Code

1393

SQL State

HY000

Explanation

Table of Contents

What is MySQL error 1393 ER_VIEW_MULTIUPDATE?

Error 1393 fires when an UPDATE or DELETE statement touches more than one base table at once through a join or an updatable view. MySQL blocks the query to protect data consistency.

The full message is "Can not modify more than one base table through a join" and often references the offending view or join alias.

When does the error occur?

The error triggers in MySQL 5.0+ whenever the optimizer detects that the target query affects multiple underlying tables in a single write operation.

It typically appears in UPDATE ... JOIN, DELETE ... USING, or in statements run against updatable views that reference several tables.

Why is it important to fix?

Ignoring the error blocks data changes and can interrupt critical workflows. Fixing it ensures data updates execute safely and predictably.

What causes MySQL error 1393?

Using UPDATE or DELETE with a JOIN clause that alters columns in more than one table fires the error.

Running UPDATE or DELETE on a view that maps to multiple base tables also triggers it, even if only one base table column is in the SET clause.

How do I fix MySQL error 1393?

Rewrite the query so each statement targets one base table. Issue separate statements for each table or use a subquery to filter rows.

For complex updates, load affected row keys into a temporary table and update tables individually inside a transaction.

Common scenarios and solutions

UPDATE ... JOIN that sets columns in both tables should be split into two updates, each referencing one table.

Views that reference multiple tables must be made read only or replaced with triggers that cascade needed changes.

Best practices to avoid the error

Always design data modification queries to update only one table at a time. Use transactions to group related updates.

Document view definitions and prohibit direct writes to complex views using SQL security definer and read only privileges.

Related errors and solutions

Error 1093: You can’t specify target table for update in FROM clause happens when a subquery references the table being updated. Use a derived table or temporary table.

Error 1394: Can not modify more than one base table through a view similarly blocks multi-table changes but is specific to MERGE statements.

Common Causes

UPDATE with multi-table JOIN

Updating columns in both tables in an UPDATE ... JOIN query.

DELETE USING multiple tables

Deleting from a view or DELETE statement that references several tables.

Updatable view touching many tables

Running UPDATE or DELETE on an updatable view that joins multiple tables.

ON UPDATE CASCADE misuse

Foreign key cascades that internally generate multi-table updates in certain MySQL versions.

Related Errors

Error 1093: You can’t specify target table for update in FROM clause

Occurs when the target table also appears in a subquery. Fix by using a derived or temporary table.

Error 1412: Table definition has changed since last checksum

Indicates metadata mismatch, often after DDL changes. Run FLUSH TABLES.

Error 1048: Column cannot be null

Not null violation during inserts or updates. Provide a valid value or change the schema.

FAQs

Can I ever update two tables at once in MySQL?

Not with a single UPDATE ... JOIN. Use separate statements within a transaction.

Does the error occur with INSERT ... SELECT?

No. It only applies to UPDATE and DELETE statements that modify data.

Will enabling SQL_MODE=STRICT fix the error?

No. The error is structural, not a strictness issue. Query redesign is required.

How does Galaxy help avoid ER_VIEW_MULTIUPDATE?

Galaxy’s AI copilot analyzes your UPDATE statements and warns when multiple base tables are targeted, guiding you to split the query before execution.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo