Click here to Skip to main content
15,798,811 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Got a trouble with the percentage in SQL. To be more precise, it is required to take a certain percentage off of a row in the column. For example (taking 40% of the row's amount). Any help will be appreciated. Thanks.

What I have tried:

I tried different queries and subqueries but none of them gives the desired result.
Updated 24-Jun-22 19:46pm
Member 15627495 25-Jun-22 0:47am    
read this sum up about percentage :

you'll find what you need sure

1 solution

SELECT ID, ValueColumn, ValueColumn - ValueColumn * 40 / 100 As [40% Off] FROM MyTable
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900