Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Math FunctionsRSS Feeds

POWER Function

Posted By: Sarita Patel     Category: SQL Server     Views: 3297

This article explains POWER function of sql server with examples.

POWER function is used to get value to the specified power to the specified for specified number.


Syntax of POWER Function :

POWER (numeric_expression, y)

numeric_expression is a number value of type numeric or approximate numeric except bit.

y is value for power to which to raise a number specified as numeric_expression. It is of type numeric or approximate numeric except bit.

Return type of POWER function is same as numeric_expression.



Examples of POWER Function :

Example 1 : Use of POWER function in select clause

SELECT POWER(2,3)

Output
8

Above example returns value for 2 raise to 3 expression.



Example 2 : Use of POWER function in select clause

SELECT POWER(-3,-2)

Output
0

Above example return value for -3 raise to -2 expression.
  
Share: 

 
 

Didn't find what you were looking for? Find more on POWER Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of POWER Function is from United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!