Java CallableStatement getShort() method with example

java.sql.CallableStatement.getShort() method Retrieves the value of the designated JDBC
SMALLINT parameter as a
short in the Java programming language.

CallableStatement getShort() method Signature

short getShort(int parameterIndex) throws SQLException

Parameters:

parameterIndex – the first parameter is 1, the second is 2, and so on

Returns:

the parameter value. If the value is SQL
NULL, the result is
0.

Throws:

SQLException – if the parameterIndex is not valid; if a database access error occurs or this method is called on a closed
CallableStatement

See Also:

setShort(java.lang.String, short)

java.sql.CallableStatement.getShort() method Implementation

short getShort(int parameterIndex) throws SQLException{
}

CallableStatement getShort() method Example

package com.ehowtonow.java.sql.callablestatement;

public class GetShortMethodExample {

	public static void main(String[] args) {

	}

}

Output


Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java AbstractSelector implCloseSelector() method with example
  2. Java ORB create_dyn_struct() method with example
  3. Java LineMetrics getStrikethroughThickness() method with example
  4. Java IntBuffer get() method with example 2
  5. Java IIOReadProgressListener sequenceComplete() method with example
  6. Java GridBagLayout getLayoutWeights() method with example
  7. Java Color getRed() method with example
  8. Java ZoneRulesProvider getVersions() method with example
  9. Java JComponent.AccessibleJComponent addPropertyChangeListener() method with example
  10. Java SSLContext createSSLEngine() method with example 1
  11. Java Rectangle intersection() method with example
  12. Java JTree expandPath() method with example
  13. Java JavaFileManager hasLocation() method with example
  14. Java Frame setTitle() method with example
  15. Java ZoneOffset query() method with example

Be the first to comment