We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here is code
UPDATE T1 [INNER JOIN | LEFT JOIN] T2 ON T1.C1 = T2. C1 SET T1.C2 = T2.C2, T2.C3 = expr WHERE condition
The text was updated successfully, but these errors were encountered:
There is no built-in support for JOIN in UpdateBuilder. Instead, you can use SQL() method to build this SQL.
JOIN
UpdateBuilder
SQL()
ub := sqlbuilder.Update("T1").SQL("INNER JOIN T2 ON T1.C1 = T2. C1") ub.Set( "T1.C2 = T2.C2", ub.Assign("T2.C3", 123), ) ub.Where(ub.In("T1.C4", "foo", "bar"))
Here is a live demo for you. https://go.dev/play/p/xfwm9P-55sX
Sorry, something went wrong.
@huandu that‘s really nice, I will try it. thanks!
No branches or pull requests
here is code
The text was updated successfully, but these errors were encountered: