zoukankan      html  css  js  c++  java
  • 查询两个表中不同(相同)的数据,并把它们显示出来

    查询两个表中不同的数据
    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

  • 相关阅读:
    hdu 4370
    lightoj 1074
    poj 1026
    poj 3159
    poj3660 cow contest
    hdu 4069 垃圾数独
    操作系统概念题复习
    ARM指令
    C++ 抢占时优先级进程调度
    Docker 入门
  • 原文地址:https://www.cnblogs.com/hejianrong/p/5852697.html
Copyright © 2011-2022 走看看