increment function in plsql

末鹿安然 提交于 2019-12-06 18:31:42

问题


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;

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

variableName := variableName + 1;

回答1:


The operators are listed in the documentation.

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

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



来源:https://stackoverflow.com/questions/28606855/increment-function-in-plsql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!