plsql中的增量函数 [英] increment function in plsql

查看:176
本文介绍了plsql中的增量函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大多数编程语言中,您可以像以下示例一样快速编写变量的增量:

In most programming languages you have a fast way to write an increment for a variable like the following examples:

inc(variableName);
variableName++;
variableName += 1;

Oracle Pl/Sql中有哪些方法可以执行此操作,而不是使用以下方法:

Which ways are there in Oracle Pl/Sql to do this instead of using the following:

variableName := variableName + 1;

推荐答案

列出了操作员没有等效的+++=.恐怕您必须做很长的路要走.

There is no equivalent of ++ or +=. I'm afraid you have to do it the long way.

您可以编写自己的inc()函数,但这可能会使您的代码对其他人的可读性降低,因为它是非标准的.

You could write your own inc() function but that would probably make your code less readable to others as it would be non-standard.

这篇关于plsql中的增量函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆