当前位置:网站首页>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边栏推荐
- win10系统重装,无法登录进行同步的情况下chrome数据恢复
- Data frame and remote frame of CAN communication
- How do programmers solve online problems gracefully?
- 一文带你彻底厘清 Isito 中的证书工作机制
- Process sibling data into tree data
- [Nodejs] node的fs模块
- 如何设计一个分布式 ID 发号器?
- 腾讯云原生:Areaki Mesh 在 2022 冬奥会视频直播应用中的服务网格实践
- 重庆市大力实施智能建造,推动建筑业数字化转型,助力“建造强市”
- 如何使用 Authing 单点登录,集成 Discourse 论坛?
猜你喜欢

如何使用 Authing 单点登录,集成 Discourse 论坛?

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

深入解析volatile关键字

【公开课预告】:超分辨率技术在视频画质增强领域的研究与应用

Process sibling data into tree data

Audio and Video Technology Development Weekly | 256

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

MySQL调优

收藏|机械工程师面试常问问题

CloudCompare & PCL ICP registration (point to face)
随机推荐
初级必备:单例模式的7个问题
【倒计时5天】探索音画质量提升背后的秘密,千元大礼等你来拿
SCHEMA solves the puzzle
Ts-Map 类的使用
【CLion】CLion 总是提示 “This file does not belong to any project target xxx” 的解决方法
Grafana9.0发布,Prometheus和Loki查询生成器、全新导航、热图面板等新功能!
CAN通信标准帧和扩展帧介绍
ECCV22|只能11%的参数就能优于Swin,微软提出快速预训练蒸馏方法TinyViT
HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
并发编程10大坑,你踩过几个?
AI目标分割能力,无需绿幕即可实现快速视频抠图
Audio and Video Technology Development Weekly | 256
How much do you know about Amazon reviews?
关于亚马逊测评,你了解多少?
[CLion] CLion always prompts "This file does not belong to any project target xxx" solution
阿里云官方 Redis 开发规范
Beyond Compare 4 trial period expires
Several methods of appending elements are commonly used in js: append, appendTo, after, before, insertAfter, insertBefore, appendChild
Dameng replaces the officially authorized dm.key
Meshlab & Open3D SOR filtering