gpt4 book ai didi

mysql - 如何使用子句(where,and not,or not)sql

转载 作者:行者123 更新时间:2023-11-28 23:39:34 26 4
gpt4 key购买 nike

如果我有这样的条件,如何使用子句(where,and not,or not)

  • 其中 table1.coloumn1='m'
  • 其中 table1.coloumn2 <>(不等于)table2.coloumn.2
  • 其中 table1.coloumn3<> (不等于)table2.coloumn3

我要展示 table1.coloumn1='m' 和( table1.colomn2-table2.coloumn2 和 table1.coloumn3-table2.coloumn )如果它们的值不同。use and, not , combined or,and 是吗?

最佳答案

随便写

select table1.*, table2.*
from table1
join table2 on table1.coloumn1='m' and table1.coloumn2<>table2.coloumn2 and table1.coloumn3 <> table2.coloumn3

关于mysql - 如何使用子句(where,and not,or not)sql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34776255/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com