当前位置:网站首页>SQL function SQRT
SQL function SQRT
2022-08-01 12:41:00 【User 7741497】
SQL function SQRT
A numeric function that returns the square root of a given numeric expression.
Outline
SQRT(numeric-expression){fn SQRT(numeric-expression)}parameter
numeric-expression- An expression that resolves to a positive number that computes the square root.
SQRT returns NUMERIC or DOUBLE data types.SQRT returns DOUBLE if numeric-expression is of data type DOUBLE; otherwise, it returns NUMERIC.
Description
SQRT Returns the square root of numeric-expression.numeric-expression must be a positive number.Negative numeric expressions (except -0) generate SQLCODE -400 errors.If a NULL value is passed, SQRT returns NULL.
SQRT returns a value with a precision of 36 and a scale of 18.
SQRT can be specified as a regular scalar function or as a ODBC scalar function (using curly brace syntax).
Example
The following examples show two forms of SQRT syntax.Both return the square root of 49:
SELECT SQRT(49) AS SRoot,{fn SQRT(49)} AS ODBCSRoot7 7The following embedded SQL example returns the square root of the integer 0 to 10:
/// d ##class(PHA.TEST.SQLFunction).Sort()ClassMethod Sort(){s a = 0while a < 11 {&sql(SELECT SQRT(:a) INTO :b)if SQLCODE '= 0 {w !,"Error code ",SQLCODE} else {w !,"The square root of ",a," = ",bs a = a + 1}}}DHC-APP>d ##class(PHA.TEST.SQLFunction).Sort()The square root of 0 = 0The square root of 1 = 1The square root of 2 = 1.414213562373095049The square root of 3 = 1.732050807568877294The square root of 4 = 2The square root of 5 = 2.236067977499789697The square root of 6 = 2.449489742783178098The square root of 7 = 2.645751311064590591The square root of 8 = 2.828427124746190098The square root of 9 = 3The square root of 10 = 3.162277660168379332边栏推荐
- MNIST是什么(plist是什么意思)
- Sparse representation - study notes
- R语言诊断ARIMA模型:forecast包构建了一个ARIMA模型、使用checkresiduals函数诊断ARIMA模型、并进行结果解读(拟合较差的ARIMA模型具有的特点)
- 阿里云官方 Redis 开发规范
- Qt获取文件夹下所有文件
- markdown常用数学符号cov(markdown求和符号)
- Programmer's self-cultivation
- Beyond Compare 4 trial period expires
- A new generation of ultra-safe cellular batteries, Sihao Airun goes on sale starting at 139,900 yuan
- formatdatetime function mysql (date sub function)
猜你喜欢

ECCV22|只能11%的参数就能优于Swin,微软提出快速预训练蒸馏方法TinyViT

通讯录(静态版)(C语言)(VS)

2022 Go ecosystem rpc framework Benchmark

CloudCompare&PCL ICP配准(点到面)

那些利用假期学习的职场人,后来都怎么样了?

STM32 CAN过滤器配置详解

MarkDown公式指导手册

Fault 007: The dexp derivative is inexplicably interrupted

Pytest e-commerce project combat (below)

Alibaba Cloud Official Redis Development Specification
随机推荐
安装apex报错
【Unity3D插件】AVPro Video插件分享《视频播放插件》
深入解析volatile关键字
R语言拟合ARIMA模型:使用forecast包中的auto.arima函数自动搜索最佳参数组合、模型阶数(p,d,q)、设置seasonal参数指定在模型中是否包含季节信息
How to get the address of WeChat video account (link address of WeChat public account)
【讲座分享】“营收“看金融
[Open class preview]: Research and application of super-resolution technology in the field of video quality enhancement
R language ggplot2 visualization: use the ggdensity function of the ggpubr package to visualize density plots, use the stat_central_tendency function to add mean vertical lines to the density and cust
这项工作事关中小学生生命安全!五部门作出联合部署
稀疏表示--学习笔记
Qt get all files in a folder
Several methods of appending elements are commonly used in js: append, appendTo, after, before, insertAfter, insertBefore, appendChild
SQL函数 %SQLUPPER
Dameng replaces the officially authorized dm.key
win10系统重装,无法登录进行同步的情况下chrome数据恢复
一文带你彻底厘清 Isito 中的证书工作机制
Aeraki Mesh Joins CNCF Cloud Native Panorama
markdown常用数学符号cov(markdown求和符号)
【StoneDB Class】入门第二课:StoneDB 整体架构解析
初级必备:单例模式的7个问题