RADIANS (Transact-SQL)RADIANS (Transact-SQL)
適用対象:Applies to: SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
数値式を角度で入力すると、ラジアンを返します。Returns radians when a numeric expression, in degrees, is entered.
Transact-SQL 構文表記規則
Transact-SQL Syntax Conventions
構文Syntax
RADIANS ( numeric_expression )
注意
SQL Server 2014 以前の Transact-SQL 構文を確認するには、以前のバージョンのドキュメントを参照してください。To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
引数Arguments
numeric_expressionnumeric_expression
bit データ型を除く、真数または概数データ型カテゴリの 式です。Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.
戻り値の型Return Types
numeric_expression と同じ型を返します。Returns the same type as numeric_expression.
例Examples
A.A. RADIANS を使用して 0.0 を表示するUsing RADIANS to show 0.0
次の例では、ラジアンに変換する数値式が RADIANS
関数にとって小さすぎる値であるため、0.0
という結果を返します。The following example returns a result of 0.0
because the numeric expression to convert to radians is too small for the RADIANS
function.
SELECT RADIANS(1e-307)
GO
結果セットは次のようになります。Here is the result set.
-------------------
0.0
(1 row(s) affected)
B.B. RADIANS を使って float 式と同等の角度を返す。Using RADIANS to return the equivalent angle of a float expression.
次の例では float
式を取得し、指定した角度の RADIANS
を返します。The following example takes a float
expression and returns the RADIANS
of the specified angle.
-- First value is -45.01.
DECLARE @angle FLOAT
SET @angle = -45.01
SELECT 'The RADIANS of the angle is: ' +
CONVERT(VARCHAR, RADIANS(@angle))
GO
-- Next value is -181.01.
DECLARE @angle FLOAT
SET @angle = -181.01
SELECT 'The RADIANS of the angle is: ' +
CONVERT(VARCHAR, RADIANS(@angle))
GO
-- Next value is 0.00.
DECLARE @angle FLOAT
SET @angle = 0.00
SELECT 'The RADIANS of the angle is: ' +
CONVERT(VARCHAR, RADIANS(@angle))
GO
-- Next value is 0.1472738.
DECLARE @angle FLOAT
SET @angle = 0.1472738
SELECT 'The RADIANS of the angle is: ' +
CONVERT(VARCHAR, RADIANS(@angle))
GO
-- Last value is 197.1099392.
DECLARE @angle FLOAT
SET @angle = 197.1099392
SELECT 'The RADIANS of the angle is: ' +
CONVERT(VARCHAR, RADIANS(@angle))
GO
結果セットは次のようになります。Here is the result set.
---------------------------------------
The RADIANS of the angle is: -0.785573
(1 row(s) affected)
---------------------------------------
The RADIANS of the angle is: -3.15922
(1 row(s) affected)
---------------------------------------
The RADIANS of the angle is: 0
(1 row(s) affected)
---------------------------------------
The RADIANS of the angle is: 0.00257041
(1 row(s) affected)
---------------------------------------
The RADIANS of the angle is: 3.44022
(1 row(s) affected)
関連項目See Also
CAST および CONVERT (Transact-SQL) CAST and CONVERT (Transact-SQL)
decimal 型と numeric 型 (Transact-SQL) decimal and numeric (Transact-SQL)
float と real (Transact-SQL) float and real (Transact-SQL)
int、bigint、smallint、tinyint (Transact-SQL) int, bigint, smallint, and tinyint (Transact-SQL)
数学関数 (Transact-SQL) Mathematical Functions (Transact-SQL)
money および smallmoney (Transact-SQL)money and smallmoney (Transact-SQL)