「MariaDB」DEGREES関数でラジアン値から角度を求める

2022年3月23日

環境
MariaDB 10.6.4

書式
DEGREES(ラジアン値)
DEGREES関数を使用してラジアン値から角度を求めます。

使用例1
ラジアン値(2 * PI( ))から角度を求めます。
SQL構文
SELECT DEGREES( 2 * PI( ) ) result
実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
MariaDB [testdb]> SELECT DEGREES( 2 * PI( ) ) result;
+--------+
| result |
+--------+
| 360 |
+--------+
1 row in set (0.045 sec)
MariaDB [testdb]> SELECT DEGREES( 2 * PI( ) ) result; +--------+ | result | +--------+ | 360 | +--------+ 1 row in set (0.045 sec)
MariaDB [testdb]> SELECT DEGREES( 2 * PI( ) ) result;
+--------+
| result |
+--------+
|    360 |
+--------+
1 row in set (0.045 sec)

使用例2
ラジアン値(PI( ))から角度を求めます。
SQL構文
SELECT DEGREES( PI( ) ) result
実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
MariaDB [testdb]> SELECT DEGREES( PI( ) ) result;
+--------+
| result |
+--------+
| 180 |
+--------+
1 row in set (0.000 sec)
MariaDB [testdb]> SELECT DEGREES( PI( ) ) result; +--------+ | result | +--------+ | 180 | +--------+ 1 row in set (0.000 sec)
MariaDB [testdb]> SELECT DEGREES(  PI( ) ) result;
+--------+
| result |
+--------+
|    180 |
+--------+
1 row in set (0.000 sec)

 

MariaDB

Posted by arkgame