如何在一个查询中加入两个条件 [英] how to join two conditions in one query

查看:109
本文介绍了如何在一个查询中加入两个条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表名"emp".我想从表中获取数据,其中curr_date是今天的日期,符号是"ABAN".如何在一个查询中编写两个条件? >解决方案

请参见以下示例.
此处 [ 选择名称,代码 from emp sign = ABAN'


u应该学会解决这些简单的问题,顺其自然.请参阅以下可能对您有帮助的内容
http://www.databasedev.co.uk/sql-multiple-conditions.html [ ^ ]


I have a table name "emp".I want to fetch data from the table where curr_date is today''s date and sign is "ABAN".How to write two conditions in one query?

解决方案

See this example.
Here[^]


Hope you want to do this

select name,code from emp where curr_date=getdate() and sign='ABAN'


u should learn to solve these simple things , let it be. refer the following that might help you
http://www.databasedev.co.uk/sql-multiple-conditions.html[^]


这篇关于如何在一个查询中加入两个条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆