相关文章推荐
踏实的佛珠  ·  linux Permission 0644 ...·  10 月前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar

Ask Question

i have to update brandname in demo1 column from demo.brandname table and make select query from demo

update  my.demo1 
inner join  
  select sku,brandname,product 
       select sku,product,brandname,count(brandname) as counter 
           select sku,product,brandname 
           from my.demo 
           where brandname is not null
       ) as derive 
       group by sku,product,brandname 
       order by counter desc
  ) as derive1 
  group by sku,product
) as ai on sku=ai.sku set brandname=ai.brandname;
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.