mysql中的where条件

这种情况下的 where条件怎么写
select
tid1,tid100022,tid100024,tid100026,c26 , c100148 , c100152 , c100153 , c100154 , c100155 , c100156 , c100157 , c100169 , c100182
from t1,t100022,t100026
where c100149 = t1 and c100150 = t100026 and c100151 = t100024

where中的 and 是这样用的吗? 麻烦大家告诉一下 这3个条件中应该如何去写,是用and还是用什么。

mysql中的where如果有多个条件的话用and连接。

如,student表中有如下数据:

现在要查,sex为男,age为20的那些数据,可用如下语句:

select * from student where sex='男' and age=20;

结果截图:

温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2017-09-06
select * from table,table2,table3 where table.id=table2.id and

table2.pass=table3.pass and table1.username=table3.username

看不懂你写的什么,可以用连续的使用and 作为条件,注意标示所对应的表和

字段名本回答被提问者采纳
第2个回答  2010-04-16
不知道那个字段是哪个表的,最好给每个表起一个别名哦。


select id from order o where o.id<1111;
第3个回答  2010-04-17
貌似是有点问题

where 表1.列名=表2.列名 and 表2.列名=表3.列名
第4个回答  2010-04-16
是这么用的

话说,这个数据库是你自己设计的么,列名的命名风格可以换换了。