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

Null Pointer Exception when updating user with subquery in UPDATE statement #80

Open
wangweicugw opened this issue Mar 21, 2023 · 0 comments

Comments

@wangweicugw
Copy link
Collaborator

I am encountering a null pointer exception when running the following SQL query to update the name of a user based on a subquery:

UPDATE t_user a, (SELECT ? AS id, ? AS name) b SET a.name = b.name WHERE a.id = b.id

when I run this query, I get a null pointer exception. Upon further investigation, I found that the subquery is returning null and causing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant