나는 이렇게 학습한다/Algorithm & SQL
SQL Basics: Raise to the Power
daco2020
2022. 6. 9. 21:36
Given the following table 'decimals':
decimals table schema
- id
- number1
- number2
Return a table with a single column result which is the output of number1 raised to the power of number2.
Solution:
SELECT
POWER(number1, number2) as result
FROM
decimals
The 'POWER' function returns the value raised to the power of the first argument by the second argument.