Update with join
See original GitHub issueWhy is this happening?
> knex('foo as f').innerJoin('bar as f').toString();
'select * from "foo" as "f" inner join "bar" as "f"'
> knex('foo as f').innerJoin('bar as f').update({a: 'b'}).toString();
'update "foo" as "f" set "a" = \'b\''
I’d expect the join to be there. I’m prettier sure this used to work with 0.11.x
Might be related to https://github.com/tgriesser/knex/issues/557
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
SQL Server UPDATE JOIN Explained By Practical Examples
SQL Server UPDATE JOIN syntax · First, specify the name of the table (t1) that you want to update in the UPDATE clause....
Read more >How can I do an UPDATE statement with JOIN in SQL ...
How can I do an UPDATE statement with JOIN in SQL Server? · 1. some relations between the tables? · How can you...
Read more >SQL | UPDATE with JOIN
SQL UPDATE JOIN could be used to update one table using another table and join condition. ... UPDATE tablename INNER JOIN tablename ON...
Read more >SQL UPDATE with JOIN | Examples
An UPDATE statement can include JOIN operations. An UPDATE can contain zero, one, or multiple JOIN operations. The UPDATE affects records that satisfy...
Read more >SQL UPDATE with JOIN
SQL UPDATE JOIN means we will update one table using another table and join condition. Let us take an example of a customer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So why close this issue? We can add support for it as it’s a perfectly plausible use case.
Maybe this one https://github.com/knex/knex/issues/2796