Access911.net   |   a9BBS   |   OTaA System  
  搜索文章︰  
Access911歡迎您光臨  
   主頁      上傳      简体版       論壇     
設為首頁  |  加入收藏   
  
你現在的位置︰文章索引 -> 文章分類 -> 函數  
 首頁|  近日更新|  下載  |  文章索引  |  搜索|  朮語|  承接工程|  
 
系統正在加載內容,請耐心等待...
 
 查詢
 窗体
 報表
 
 
 VBA
 函數
 ADO/DAO/ADO.NET
 API
 ADP
 安全
 發布
 OA
 ASP/ASP.NET
 其他語言
 控件
 DELPHI
 C#/.Net
 本站
 其他
 小例程
 常用軟件
 參考文檔
 業主作品
 网友大作
 
 
友情鏈接
 access911.net
 
訪問人次
 1702236
 
站長 E-Mail
 net911@sina.com
 access911@gmail.com
 
RSS 訂閱

顯示附加信息 >>>

ODBC標量函數(2)(英文)──數值函數

作者︰MS  摘自︰Microsoft  ︰cg1  更新日期︰2004-7-13  瀏覽人次︰

 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcstring_functions.asp

Numeric Functions

The following table describes numeric functions that are included in the ODBC scalar function set. By calling SQLGetInfo with an information type of SQL_NUMERIC_FUNCTIONS, an application can determine which numeric functions are supported by a driver.

All numeric functions return values of data type SQL_FLOAT except for ABS, ROUND, TRUNCATE, SIGN, FLOOR, and CEILING, which return values of the same data type as the input parameters.

Arguments denoted as numeric_exp can be the name of a column, the result of another scalar function, or a numeric-literal, where the underlying data type could be represented as SQL_NUMERIC, SQL_DECIMAL, SQL_TINYINT, SQL_SMALLINT, SQL_INTEGER, SQL_BIGINT, SQL_FLOAT, SQL_REAL, or SQL_DOUBLE.

Arguments denoted as float_exp can be the name of a column, the result of another scalar function, or a numeric-literal, where the underlying data type can be represented as SQL_FLOAT.

Arguments denoted as integer_exp can be the name of a column, the result of another scalar function, or a numeric-literal, where the underlying data type can be represented as SQL_TINYINT, SQL_SMALLINT, SQL_INTEGER, or SQL_BIGINT.

The CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP scalar functions have been added in ODBC 3.0 to align with SQL-92.

Function Description
ABS(numeric_exp)
(ODBC 1.0)
Returns the absolute value of numeric_exp.
ACOS(float_exp)
(ODBC 1.0)
Returns the arccosine of float_exp as an angle, expressed in radians.
ASIN(float_exp)
(ODBC 1.0)
Returns the arcsine of float_exp as an angle, expressed in radians.
ATAN(float_exp)
(ODBC 1.0)
Returns the arctangent of float_exp as an angle, expressed in radians.
ATAN2(float_exp1, float_exp2)
(ODBC 2.0)
Returns the arctangent of the x and y coordinates, specified by float_exp1 and float_exp2, respectively, as an angle, expressed in radians.
CEILING(numeric_exp)
(ODBC 1.0)
Returns the smallest integer greater than or equal to numeric_exp. The return value is of the same data type as the input parameter.
COS(float_exp)
(ODBC 1.0)
Returns the cosine of float_exp, where float_exp is an angle expressed in radians.
COT(float_exp)
(ODBC 1.0)
Returns the cotangent of float_exp, where float_exp is an angle expressed in radians.
DEGREES(numeric_exp)
(ODBC 2.0)
Returns the number of degrees converted from numeric_exp radians.
EXP(float_exp)
(ODBC 1.0)
Returns the exponential value of float_exp.
FLOOR(numeric_exp)
(ODBC 1.0)
Returns the largest integer less than or equal to numeric_exp. The return value is of the same data type as the input parameter.
LOG(float_exp)
(ODBC 1.0)
Returns the natural logarithm of float_exp.
LOG10(float_exp)
(ODBC 2.0)
Returns the base 10 logarithm of float_exp.
MOD(integer_exp1, integer_exp2)
(ODBC 1.0)
Returns the remainder (modulus) of integer_exp1 divided by integer_exp2.
PI( )
(ODBC 1.0)
Returns the constant value of pi as a floating-point value.
POWER(numeric_exp, integer_exp)
(ODBC 2.0)
Returns the value of numeric_exp to the power of integer_exp.
RADIANS(numeric_exp)
(ODBC 2.0)
Returns the number of radians converted from numeric_exp degrees.
RAND([integer_exp])
(ODBC 1.0)
Returns a random floating-point value using integer_exp as the optional seed value.
ROUND(numeric_exp, integer_exp)
(ODBC 2.0)
Returns numeric_exp rounded to integer_exp places right of the decimal point. If integer_exp is negative, numeric_exp is rounded to |integer_exp| places to the left of the decimal point.
SIGN(numeric_exp)
(ODBC 1.0)
Returns an indicator of the sign of numeric_exp. If numeric_exp is less than zero, 每1 is returned. If numeric_exp equals zero, 0 is returned. If numeric_exp is greater than zero, 1 is returned.
SIN(float_exp)
(ODBC 1.0)
Returns the sine of float_exp, where float_exp is an angle expressed in radians.
SQRT(float_exp)
(ODBC 1.0)
Returns the square root of float_exp.
TAN(float_exp)
(ODBC 1.0)
Returns the tangent of float_exp, where float_exp is an angle expressed in radians.
TRUNCATE(numeric_exp, integer_exp)
(ODBC 2.0)
Returns numeric_exp truncated to integer_exp places right of the decimal point. If integer_exp is negative, numeric_exp is truncated to |integer_exp| places to the left of the decimal point.


 

 
相關文章
     沒有手動相關文章
     ODBC標量函數(6)(英文)──SQL 92 CAST 函數
     ODBC標量函數(5)(英文)──數據類型轉換函數
     ODBC標量函數(4)(英文)──系統函數
     ODBC標量函數(3)(英文)──日期時間函數
     ODBC標量函數(1)(英文)──字符串
 
評論
     查看或發表更多的評論,請單擊這里。
 
 
 
 
 
   
  Access911.net   |   a9BBS   |   OTaA System   |
建站日期︰2000年4月2日  |  設計施工︰陳格 ( access911 & cg1 )
 Copyright © 2000 - 2003 COMET, 陳格 保留所有權利