POWER()
Description
POWER(X, Y) returns the value of X raised to the power of Y.
Syntax
1. > POWER(X, Y)
Arguments
| Arguments | Description |
|---|---|
| X | Required. Any numeric data type supported now. |
| Y | Required. Any numeric data type supported now. |
Examples
1. > drop table if exists t1;
2. > create table t1(a int,b int);
3. > insert into t1 values(5,-2),(10,3),(100,0),(4,3),(6,-3);
4. > select power(a,b) from t1;
5. +-------------+
6. | power(a, b) |
7. +-------------+
8. | 0.0400 |
9. | 1000.0000 |
10. | 1.0000 |
11. | 64.0000 |
12. | 0.0046 |
13. +-------------+
14. > select power(a,2) as a1, power(b,2) as b1 from t1 where power(a,2) > power(b,2) order by a1 asc;
15. +------------+--------+
16. | a1 | b1 |
17. +------------+--------+
18. | 16.0000 | 9.0000 |
19. | 25.0000 | 4.0000 |
20. | 36.0000 | 9.0000 |
21. | 100.0000 | 9.0000 |
22. | 10000.0000 | 0.0000 |
23. +------------+--------+
Constraints
Currently, MatrixOne doesn’t support select function() without from tables.
