Skip to content
New issue

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

Support row and column aliases in INSERT ON DUPLICATE KEY UPDATE #4479

Closed
Hydrocharged opened this issue Jan 25, 2021 · 1 comment
Closed
Labels
analyzer enhancement New feature or request sql Issue with SQL

Comments

@Hydrocharged
Copy link
Contributor

Given the following example queries:

INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS new ON DUPLICATE KEY UPDATE c = new.a+new.b;
INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS new(m,n,p) ON DUPLICATE KEY UPDATE c = m+n;
INSERT INTO t1 SET a=1,b=2,c=3 AS new ON DUPLICATE KEY UPDATE c = new.a+new.b;
INSERT INTO t1 SET a=1,b=2,c=3 AS new(m,n,p) ON DUPLICATE KEY UPDATE c = m+n;

We currently do not support the AS new portion, which are the aliases.

Reference:
https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html

@zachmu zachmu transferred this issue from dolthub/go-mysql-server Oct 6, 2022
@timsehn timsehn added enhancement New feature or request sql Issue with SQL labels Oct 6, 2022
@nicktobey
Copy link
Contributor

This is a dupe of #7638, closing this one because the other issue has more context.

@nicktobey nicktobey closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer enhancement New feature or request sql Issue with SQL
Projects
None yet
Development

No branches or pull requests

3 participants