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

[db] others #26

Open
Alice52 opened this issue Sep 26, 2021 · 0 comments
Open

[db] others #26

Alice52 opened this issue Sep 26, 2021 · 0 comments
Assignees

Comments

@Alice52
Copy link
Owner

Alice52 commented Sep 26, 2021

  1. 可以使用关联子查询去重

    DELETE FROM Products P1
    WHERE id < ( 
          SELECT MAX(P2.id) 
          FROM Products P2 
          WHERE P1.name = P2.name AND P1.price = P2.price
    ); 
  2. 去重- groupby-max+delete

@Alice52 Alice52 self-assigned this Sep 26, 2021
@Alice52 Alice52 mentioned this issue Sep 11, 2023
@Alice52 Alice52 transferred this issue from Alice52/java-ocean Sep 11, 2023
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