0
IN
比較構文を使用してこれを行う方法を知りたい。MySQLの "in"コマンド
現在のSQLクエリは次のとおりです。
select * from employee
where (employeeName = 'AJAY' and month(empMonth) = month(curdate()))
or (employeeName ='VINAY' and month(empMonth) = month(curdate()))
私はIN
比較関数を使用して、それを試してみましたが、正しく作品を設定することができません。誰も私を助けることができますか?
select * from employee
where employeeName in ('AJAY','VINAY')
and month(empMonth) = month(curdate()); // ERROR.
私はそれをMySQL Queryで試しました。
はあなたのソリューションは、ほとんどのDBMS(データベース管理システム)の罰金で、 シンドゥ
? –
あなたのお問い合わせが100%正しいと思われます。おそらく他の場所にエラーがあります。 –
これを試すことができます: 'select * from employeeここで( 'AJAY'、 'VINAY')の従業員名)(month(empMonth)= month(curdate()))' –