SQL and PL/SQL--When we use mod function if salary is less than comm then the remainder becomes actual salary. Why is this answer wrong?
Not sure I understand why it's wrong.
Mod(37,9) = 1 Mod(9,37) = 9
Sorry, I have not myself tried the Oracle MOD function, but if it implements the modulus operation correctly, then yes, Mod(Salary,Comm) will be equal to Salary whenever Salary is less than Comm.
You might need a CASE structure in your SQL...
For More Information
- What do you think about this answer? E-mail us at editor@searchDatabase.com with your feedback.
- The Best Microsoft SQL Server Web Links: tips, tutorials, scripts, and more.
- The Best SQL Web Links
- Have a SQL tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
- Ask your technical SQL questions--or help out your peers by answering them--in our live discussion forums.
- Ask the Experts yourself: Our SQL guru is waiting to answer your technical questions.
Dig Deeper on Oracle and SQL
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.