diff --git a/components/Sidebar.jsx b/components/Sidebar.jsx
index d9d6fdd6..f7eeb4d2 100644
--- a/components/Sidebar.jsx
+++ b/components/Sidebar.jsx
@@ -127,6 +127,7 @@ export default class Sidebar extends Component {
– upsert
– update
– del / delete
+ – using
– returning
– transacting
– forUpdate
diff --git a/sections/builder.js b/sections/builder.js
index d104b849..664299e2 100644
--- a/sections/builder.js
+++ b/sections/builder.js
@@ -1962,6 +1962,37 @@ export default [
.where('title', 'Alice in Wonderland')
.del(['id', 'title'], { includeTriggerModifications: true })
`
+ },
+ {
+ type: "text",
+ content: "For PostgreSQL, Delete statement with joins is both supported with classic 'join' syntax and 'using' syntax."
+ },
+ {
+ type: "runnable",
+ content: `
+ knex('accounts')
+ .where('activated', false)
+ .join('accounts', 'accounts.id', 'users.account_id')
+ .del()
+ `
+ }
+ ]
+ },
+ {
+ type: "method",
+ method: "using",
+ example: ".using(tableName|tableNames)",
+ description: "Can be used to define in PostgreSQL a delete statement with joins with explicit 'using' syntax. Classic join syntax can be used too.",
+ children: [
+ {
+ type: "runnable",
+ content: `
+ knex('accounts')
+ .where('activated', false)
+ .using('accounts')
+ .whereRaw('accounts.id = users.account_id')
+ .del()
+ `
}
]
},