
How to do simple math in an SQL SELECT query? - Stack Overflow
How to do simple math in an SQL SELECT query? Asked 13 years, 6 months ago Modified 13 years, 6 months ago Viewed 34k times
How to calculate percentage with a SQL statement
Due to precedence of SQL statements it will be the same. however, due to data types if using 100 you can still get the result rounded to 0 decimals you desire for the % where as if you put it after the …
Max function in SQL Server that takes two values like Math.Max in .NET ...
Max function in SQL Server that takes two values like Math.Max in .NET Asked 17 years, 3 months ago Modified 7 months ago Viewed 720k times
Writing a Mathematical Formula in SQL? - Stack Overflow
Writing a Mathematical Formula in SQL? Asked 13 years, 4 months ago Modified 6 years, 1 month ago Viewed 52k times
sql server - SQL DATETIME Math - Stack Overflow
Aug 14, 2012 · SQL DATETIME Math Asked 13 years, 4 months ago Modified 13 years, 4 months ago Viewed 7k times
Getting the minimum of two values in SQL - Stack Overflow
182 The solutions using CASE, IIF, and UDF are adequate, but impractical when extending the problem to the general case using more than 2 comparison values. The generalized solution in SQL Server …
sql server - T-SQL rounding vs. C# rounding - Stack Overflow
I am using Microsoft SQL Server Express 2016 to write a stored procedure. One of the requirements is to do rounding. But every now and then, the rounding is wrong. I found out that T-SQL rounding i...
math - Round *UP* to the nearest 100 in SQL Server - Stack Overflow
Is it possible to easily round a figure up to the nearest 100 (or 1000, 500, 200 etc.) in SQL Server? So: 720 -> 800 790 -> 800 1401 -> 1500
Decimal values in SQL for dividing results - Stack Overflow
Jan 29, 2011 · In SQL, decimal values can be used for dividing results by specifying decimal literals or using decimal columns in the division operation. Here's an example: Let's say you have a table …
How to SUM and SUBTRACT using SQL? - Stack Overflow
50 I am using MySQL and I have two tables: master_table ORDERNO ITEM QTY stock_bal ITEM BAL_QTY Master table has duplicate ORDERNO and ITEM values. I have get total QTY using SQL …