diff --git a/docs/en/reference/query-builder.rst b/docs/en/reference/query-builder.rst
index b15a75f67ac..ecfb5337663 100644
--- a/docs/en/reference/query-builder.rst
+++ b/docs/en/reference/query-builder.rst
@@ -309,7 +309,7 @@ user-input:
update('users', 'u')
+ ->update('users u')
->set('u.logins', 'u.logins + 1')
->set('u.last_login', '?')
->setParameter(0, $userInputLastLogin)
diff --git a/src/Query/QueryBuilder.php b/src/Query/QueryBuilder.php
index 9f4eb5a30a4..c6d33448ab3 100644
--- a/src/Query/QueryBuilder.php
+++ b/src/Query/QueryBuilder.php
@@ -580,8 +580,8 @@ public function addSelect(string $expression, string ...$expressions): self
*
*
* $qb = $conn->createQueryBuilder()
- * ->delete('users')
- * ->where('users.id = :user_id')
+ * ->delete('users u')
+ * ->where('u.id = :user_id')
* ->setParameter(':user_id', 1);
*
*
@@ -606,9 +606,9 @@ public function delete(string $table): self
*
*
* $qb = $conn->createQueryBuilder()
- * ->update('counters')
- * ->set('counters.value', 'counters.value + 1')
- * ->where('counters.id = ?');
+ * ->update('counters c')
+ * ->set('c.value', 'c.value + 1')
+ * ->where('c.id = ?');
*
*
* @param string $table The table whose rows are subject to the update.
@@ -785,7 +785,7 @@ public function rightJoin(string $fromAlias, string $join, string $alias, ?strin
*
*
* $qb = $conn->createQueryBuilder()
- * ->update('counters', 'c')
+ * ->update('counters c')
* ->set('c.value', 'c.value + 1')
* ->where('c.id = ?');
*
@@ -821,7 +821,7 @@ public function set(string $key, string $value): self
* $or->add($qb->expr()->eq('c.id', 1));
* $or->add($qb->expr()->eq('c.id', 2));
*
- * $qb->update('counters', 'c')
+ * $qb->update('counters c')
* ->set('c.value', 'c.value + 1')
* ->where($or);
*