I have a table in Oracle which saves the percentage of tax based on different salaries, eg Tax is 5% if Salary is >5000 and Salary is < 10000. Here is the structure of my table:
CREATE TABLE TaxDetailTable
( MinSalary FLOAT(126),
MaxSalary FLOAT(126),
TAX_PERCENT FLOAT(126)
)
now i want to get that percentage value based on the salary i input using C#. Right now i am just comparing the salary i have provided to the input values, but i want some efficient way to do this.Can someone help me? My query is:
Select Tax_Percent From TaxDetailTable Where MinSal >= inputSal And MaxSal <= inputSal
这是一个更好的查询,可能会返回数据:
Select tax_percent From taxDetailTable Where inputSal Between minSal And maxSal
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.