Beginner

297. SQRT Function

Learn how to calculate the square root of a numeric value.

📘 Lesson 297 of 728 ⏱ 9 min 🎯 Intermediate

The SQRT function returns the square root of a numeric expression where supported by the database system.

Square-root calculations are used in statistical formulas, mathematical analysis, distance calculations, and certain business models.

Calculate the square root of a variance value.

SQL
SELECT
    SQRT(variance_value) AS StandardDeviationComponent
FROM RiskMetrics;

SQRT can be used in statistical analysis, mathematical modeling, risk calculations, and analytical formulas.

  • SQRT calculates a square root.
  • It is a mathematical function.
  • The input normally needs to be non-negative.
  • It can support statistical calculations.
  • Database behavior for invalid input can vary.
What does SQRT return?

SQRT returns the square root of a numeric expression.

Where can SQRT be used?

SQRT can be used in statistical calculations, mathematical models, and analytical formulas.

Have you finished this lesson?

Introduction to SQL – All Lessons