如何从表中获取数据? [英] how to get data from table?
本文介绍了如何从表中获取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HERE是表的值
代码A B
0001正确错误
0002错误错误
0003错误True
0004正确正确
我想要以下结果(A = B = False; A = B = True; AND A = False B = True
代码A B
0002错误错误
0003错误True
0004正确正确
是否有可能....帮助我
HERE is value of table
CODE A B
0001 True False
0002 False False
0003 False True
0004 True True
I want result as following(A=B=False;A=B=True;AND A=False B=True
CODE A B
0002 False False
0003 False True
0004 True True
Is it possible....Help me
推荐答案
这也意味着您要排除"A = True B = False",在这种情况下,您可以尝试以下操作查询.
That also means you want to exclude "A=True B=False", In this case you can try as below Query.
Select * from TableName where A='False' and B='False'
Union
Select * from TableName where A='True' and B='True'
Union
Select * from TableName where A='False' and B='True';
这篇关于如何从表中获取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文