不知道截图可不可以!数据库版本是5.5.28的。比如: 现有三条一一对应的数据条件(1-A,2-B,3-C)[我这里可能会有更多对条件] select *from A where id=1 and name='A' select *from A where id=2 and name='B' select *from A where id=3 and name='C' 所以结果最多不会超过3条 但是它查询出来的结果会远远多于三条 因为他可能会这样组合查询 select *from A where id=1 and name='B' select *from A where id=2 and name='A' select *from A where id=3 and name='A' 等等 但是不知道改如何去修改了,本人也是上个月底第一次接触MySql数据库!
参考一下这个贴子的提问方式http://bbs.csdn.net/topics/320211382
1. 你的 create table xxx .. 语句
2. 你的 insert into xxx ... 语句
3. 结果是什么样,(并给以简单的算法描述)
4. 你用的数据库名称和版本(经常有人在MS SQL server版问 MySQL)
这样想帮你的人可以直接搭建和你相同的环境,并在给出方案前进行测试,避免文字描述理解上的误差。
不知道截图可不可以!数据库版本是5.5.28的。比如:
现有三条一一对应的数据条件(1-A,2-B,3-C)[我这里可能会有更多对条件]
select *from A where id=1 and name='A'
select *from A where id=2 and name='B'
select *from A where id=3 and name='C'
所以结果最多不会超过3条
但是它查询出来的结果会远远多于三条
因为他可能会这样组合查询
select *from A where id=1 and name='B'
select *from A where id=2 and name='A'
select *from A where id=3 and name='A'
等等
但是不知道改如何去修改了,本人也是上个月底第一次接触MySql数据库!