Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7621177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:07:55+00:00 2026-05-31T04:07:55+00:00

Guys can you help me with this not working query? UPDATE DB_1 left join

  • 0

Guys can you help me with this not working query?

UPDATE DB_1 
left join blacklist as blk 
    on DB_1.last_email=blk.email 
SET DB_1.sampling = ? 
WHERE blk.email IS NULL 
    and DB_1.sampling IS NULL 
LIMIT "+slot;

I need to update 25k row at the time but doing this is not working. How can I create a query that does work? I was thinking to drop the left join and use an IN for the join.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:07:56+00:00Added an answer on May 31, 2026 at 4:07 am

    Do you you want to update the rows in DB_1 that are not in the blacklist?

    You can try:

    UPDATE 
        DB_1 
    SET 
        DB_1.sampling = ? 
    WHERE 
        NOT EXISTS
          ( SELECT *
            FROM blacklist AS blk 
            WHERE blk.email = DB_1.last_email
          ) 
    ORDER BY  
        <something>
    LIMIT 
        <whatever>
    

    or:

    UPDATE 
            DB_1 AS upd
        JOIN
            ( SELECT t.PK
              FROM 
                      DB_1 AS t
                  LEFT JOIN 
                      blacklist AS blk 
                          ON blk.email = t.last_email
              WHERE 
                  blk.email IS NULL
              ORDER BY  
                  <something>
              LIMIT 
                  <whatever>
           ) AS lim
               ON lim.PK = upd.PK
    SET 
        upd.sampling = ? 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope some of you guys can help me with this problem.... I have
Hi Guys can you please help me with this error? What is it? Server
Can you guys help me figure this out? I have the following JavaScript snippet:
I hope you guys can help me with this one. So, I have a
hey guys, this might be really stupid, but hopefully someone can help. I'm trying
Hi guys I hope someone can help me with this I´m really stuck although
maybe you guys can help me with this. I am trying to implement reCAPTCHA
I'm learning Ruby right now and I got stuck, maybe you guys can help
Guys I am a starting programmer and need help. I am working on PART
Code updated to working version. Thanks again for the help :) Hey guys. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.