answersLogoWhite

0

A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable. The following code fragment, in which con is a valid Connection object, illustrates how to make a result set that is scrollable and insensitive to updates by others, and that is updatable. See ResultSet fields for other options. Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2"); // rs will be scrollable, will not show changes made by others, // and will be updatable In simple words, result set can store the result of the database query(SQL query).

Visit here for more: docs.oracle.com/javase/1.4.2/docs/api/java/sql/ResultSet.html

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Define set in java?

A Java set is a collection of things that do not contain duplicate elements. Duplicates are prohibited from Java sets.


How do you set the constant textarea in java?

we can set the value of constant text area in Java in swing by creating a object of Jframe


What are the regulations and guidelines for using Java trademarks in software development and distribution?

When using Java trademarks in software development and distribution, it is important to adhere to the regulations and guidelines set by Oracle, the owner of Java. This includes obtaining proper licensing, following branding guidelines, and avoiding any misuse or misrepresentation of the Java trademarks. Failure to comply with these regulations can result in legal action.


Why does java does not run on Linux?

the short answer is that it does. assuming you have java installed and your path set, it's as easy as javac javafilename.java java javafilename or if you have it as a jar file java -jar jarfilename.jar


How do you set classpath for java?

Classpath for Java can only be set depending on what system is being used. The environment also has to be specified in order for Classpath to work at its best.


Why it is required to set path and classpath?

to compile and run java program you need to set path and classpath path refers to binary used to compile and run java program i.e. "javac" for compilation and "java" for execution


Which operator works like sizeof operator in Java?

Java does not have the sizeOf() operator or any operator that gives an equivalent result.


How do you set java environment variables?

You need to set The CLASSPATH variable which is an argument set on the command-line that tells the Java Virtual Machine where to look for user-defined classes and packages in Java programs. Syntax is java -classpath "path to the packages". Set the PATH variable if you want to be able to conveniently run the Java 2 SDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. To set the PATH permanently, add the full path of the j2sdk1.4.2_version\bin directory to the PATH variable. -sravyaa


When did Sun Microsystems split and become JAVA?

Sun Microsystems did not "split" to "become" Java. Sun is a company, which invented and set out the specifications for the Java programming language in 1995.


Difference between equals equals and equal in java?

"==" in java is the binary operator which compares two values and gives a boolean result While "=" in java is a assignment operator which assigns a value to a variable.


Who discovered java and when?

java was discovered by James gosling and Co. in 1991 at sun micro systems..they renamed oak to java..initially java used in programming for set top boxes (for movie on demand..)


How do you set core java class path?

in Windows : specify environment variable as classpath orset classpath="list of directories" e.g. set classpath="C:\java\lib"in Linux export CLASSPATH="your classpath" e.g. export CLASSPATH="/home/java/lib"