Get tired of typing in all the arguments every time, so make some of the arguments optional, with default values.
厌倦了每次都输入所有的参数,于是让一些参数成为可选的参数,让这些参数带有默认的值。
Another interesting and simpler use case for this method is in providing default values for arguments.
这种方法的另一个更简单的有趣用例是,为参数提供默认值。
In the following unique stored procedure the arguments listprice and minprice have default values.
在下面的惟一的存储过程中,参数listprice和minprice有默认值。
If the number of parameters in CallableStatement is less than the number of arguments in the stored procedure, the remaining arguments must have default values.
如果CallableStatement中的参数数量少于存储过程中的参数数量,那么剩下的参数必须有默认值。
For example, if a stored procedure has 10 arguments of which four have non-default values and six have default values, you must have at least four question marks in the CallableStatement.
例如,如果一个存储过程有10个参数,其中4个参数没有默认值,6个参数有默认值,那么在CallableStatement中必须至少有4个问号。
For example, if a stored procedure has 10 arguments of which four have non-default values and six have default values, you must have at least four question marks in the CallableStatement.
例如,如果一个存储过程有10个参数,其中4个参数没有默认值,6个参数有默认值,那么在CallableStatement中必须至少有4个问号。
应用推荐