hejianrong

查询两个表中不同的数据
select ecs_brand.brand_id,ecs_brand.brand_name from 表名ecs_brand where ecs_brand.brand_id not in (select distinct ecs_goods.brand_id from 表名ecs_goods where ecs_goods.is_on_sale = 1 AND ecs_goods.is_alone_sale = 1 AND ecs_goods.is_delete = 0) and ecs_brand.is_show=1

查询两个表中相同的数据

select distinct a.brand_id,a.brand_name from ecs_brand a,ecs_goods b where a.is_show=1 and b.is_on_sale = 1 and b.is_alone_sale = 1 and b.is_delete = 0 and a.brand_id = b.brand_id

分类:

技术点:

相关文章:

  • 2021-04-26
  • 2022-03-09
  • 2021-10-01
  • 2021-11-15
  • 2021-10-04
  • 2021-12-03
  • 2023-02-02
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
相关资源
相似解决方案