当前位置:网站首页>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边栏推荐
- MySQL调优
- R语言诊断ARIMA模型:forecast包构建了一个ARIMA模型、使用checkresiduals函数诊断ARIMA模型、并进行结果解读(拟合较差的ARIMA模型具有的特点)
- 快速幂---学习笔记
- SCHEMA解惑
- Deep understanding of Istio - advanced practice of cloud native service mesh
- AI目标分割能力,无需绿幕即可实现快速视频抠图
- SQL函数 %SQLUPPER
- js中常用追加元素的几种方法:append,appendTo,after,before,insertAfter,insertBefore,appendChild
- 关于亚马逊测评,你了解多少?
- 通配符SSL证书不支持多域名吗?
猜你喜欢

深入解析volatile关键字

CAN通信的数据帧和远程帧

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

重庆市大力实施智能建造,推动建筑业数字化转型,助力“建造强市”

这项工作事关中小学生生命安全!五部门作出联合部署

The four methods of judging JS data type

2022 Go生态圈 rpc 框架 Benchmark

Beyond Compare 4 试用期到期

STM32 CAN filter configuration details

The CAN communication standard frame and extended frame is introduced
随机推荐
[Open class preview]: Research and application of super-resolution technology in the field of video quality enhancement
Towhee 每周模型
How to Integrate Your Service Registry with Istio?
bat倒计时代码
稀疏表示--学习笔记
Feign 从注册到调用原理分析
R语言ggplot2可视化:使用ggpubr包的ggscatter函数可视化散点图、使用xscale函数指定X轴坐标轴度量调整方式、设置x轴坐标为scientific使用科学计数法显示坐标值
英特尔全方位打造算力基础,助推“算”赋百业
【讲座分享】“营收“看金融
安装apex报错
[CLion] CLion always prompts "This file does not belong to any project target xxx" solution
MNIST是什么(plist是什么意思)
Fault 007: The dexp derivative is inexplicably interrupted
蔚来又一新品牌披露:产品价格低于20万
数据湖 delta lake和spark版本对应关系
关于Request复用的那点破事儿。研究明白了,给你汇报一下。
Deep understanding of Istio - advanced practice of cloud native service mesh
Simulation implementation of new of Js handwritten function
SQL函数 %SQLSTRING
意大利普拉托华社将游行示威 盼解决安全问题