当前位置:网站首页>SQL function SQUARE
SQL function SQUARE
2022-08-01 12:42:00 【User 7741497】
SQL function SQUARE
A scalar numeric function that returns the square of a number.
Outline
SQUARE(numeric-expression)parameter
numeric-expression- An expression that resolves to a numeric value.
SQUARE returns NUMERIC or DOUBLE data types.If numeric-expression is of data type DOUBLE, SQUARE returns DOUBLE; otherwise, it returns NUMERIC.
Description
SQUARE Returns the square of a numeric expression.If a NULL value is passed, SQUARE returns NULL.
SQUARE returns the same precision and scale as the SQL multiply operator.
Example
The following embedded SQL example returns the square of the integer 0 to 10:
/// d ##class(PHA.TEST.SQLFunction).Square()ClassMethod Square(){s a = 0while a < 11 {&sql(SELECT SQUARE(:a) INTO :b)if SQLCODE '= 0 {w !,"Error code ",SQLCODE} else {w !,"The square of ",a," = ",bs a = a + 1}}}DHC-APP>d ##class(PHA.TEST.SQLFunction).Square()The square of 0 = 0The square of 1 = 1The square of 2 = 4The square of 3 = 9The square of 4 = 16The square of 5 = 25The square of 6 = 36The square of 7 = 49The square of 8 = 64The square of 9 = 81The square of 10 = 100边栏推荐
- 【Unity3D插件】AVPro Video插件分享《视频播放插件》
- [CLion] CLion always prompts "This file does not belong to any project target xxx" solution
- 【社区明星评选】第24期 8月更文计划 | 笔耕不辍,拒绝躺平!更多原创激励大礼包,还有华为WATCH FIT手表!
- 音视频技术开发周刊 | 256
- Simulation implementation of new of Js handwritten function
- Grafana9.0发布,Prometheus和Loki查询生成器、全新导航、热图面板等新功能!
- 这项工作事关中小学生生命安全!五部门作出联合部署
- 如何将第三方服务中心注册集成到 Istio ?
- 如何成功通过 CKA 考试?
- Transfer learning to freeze the network:
猜你喜欢

【StoneDB Class】入门第二课:StoneDB 整体架构解析

音视频技术开发周刊 | 256

The CAN communication standard frame and extended frame is introduced

程序员如何优雅地解决线上问题?

HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界

Pytest e-commerce project combat (below)

字体反爬之好租

leetcode/submatrix element sum

The four methods of judging JS data type

【讲座分享】“营收“看金融
随机推荐
2022 Go ecosystem rpc framework Benchmark
Audio and Video Technology Development Weekly | 256
Grafana9.0发布,Prometheus和Loki查询生成器、全新导航、热图面板等新功能!
一文带你彻底厘清 Isito 中的证书工作机制
一文带你彻底厘清 Kubernetes 中的证书工作机制
音视频技术开发周刊 | 256
【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用
How do programmers solve online problems gracefully?
bat countdown code
Aeraki Mesh 正式成为 CNCF 沙箱项目
kubernetes之DaemonSet以及滚动更新
如何成功通过 CKA 考试?
Sparse representation - study notes
通配符SSL证书不支持多域名吗?
【讲座分享】“营收“看金融
How to use DevExpress controls to draw flowcharts?After reading this article, you will understand!
R语言检验时间序列的平稳性:使用tseries包的adf.test函数实现增强的Dickey-Fuller(ADF)检验、检验时序数据是否具有均值回归特性(平稳性)、具有均值回归特性的案例
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
安装apex报错
[CLion] CLion always prompts "This file does not belong to any project target xxx" solution