Rishi Raj has Published 127 Articles

Java ResultSetMetaData getColumnLabel() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

447 Views

The getColumnLabel() method of the ResultSetMetaData (interface) retrieves the display name of a particular column.This method accepts an integer value representing the index of the column in the current ResultSet object, as an argument and, returns a String value representing the label of the specified column.To get the ResultSetMetaData object, you ... Read More

Java ResultSetMetaData getCatalogName() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

149 Views

In general a catalog is a directory which holds information about data sets, file or, a database. Whereas, in a database, catalog holds the list of all the databases, base tables, views (virtual tables), synonyms, value ranges, indexes, users, and user groups.The getCatalogName() method of the ResultSetMetaData (interface) retrieves the name of the ... Read More

Java ResultSetMetaData getPercision() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

194 Views

The getPercision() method of the ResultSetMetaData (interface) retrieves the size of the specified column in the current ResultSet object.This method accepts an integer value representing the index of a column and, returns an integer value representing the size of the given column.To get the ResultSetMetaData object, you need to −Register the ... Read More

Java ResultSetMetaData getTableName() method with example.

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

692 Views

The getTableName() method of the ResultSetMetaData (interface) retrieves and displays the name of the table which contains the given column.This method accepts an integer value representing the index of a column and, returns a String value representing the name of the table that contains the given column.To get the ResultSetMetaData object, ... Read More

Java DatabaseMetaData supportsStoredProcedures() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

45 Views

The supportsStoredProcedures() method of the DatabaseMetaData interface is used to determine whether the underlying database supports stored procedures.This method returns a boolean value which is −True, when the underlying database supports stored procedures.False, when the underlying database doesn't support stored procedures.To determine whether the underlying database supports stored procedures−Make sure ... Read More

Java DatabaseMetaData supportsResultSetConcurrency() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

162 Views

While creating a Statement object you can choose the concurrency and the type of the ResultSet object using the following variant of the createStatement() method −Statement createStatement(int resultSetType, int resultSetConcurrency)ResultSet ConcurrencyThe concurrency of the ResultSet object determines whether its contents can be updated or not.The ResultSet interface provides two values to specify ... Read More

Java DatabaseMetaData supportsGroupBy() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

38 Views

The SQL GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups. This GROUP BY clause follows the WHERE clause in a SELECT statement and precedes the ORDER BY clause.SyntaxThe basic syntax of a GROUP BY clause is shown in the following code ... Read More

Java Connection setHoldability() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

281 Views

ResultSet holdability determines whether the ResultSet objects (cursors) should be closed or held open when a transaction (that contains the said cursor/ ResultSet object) is committed using the commit() method of the Connection interface.The setHoldability() method of the Connection interface is used to set the holdability of the ResultSet objects in this ... Read More

Java Connection getAutoCommit() method with example

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

567 Views

If you commit a database, it saves all the changes that have been done till that particular point. By default, some databases commits/saves the changes done automatically. You can turn off/on the auto-commit using the setAutoCommit() method of the Connection interface.The getAutocommit() method of the Connection interface is used to ... Read More

How to establish a connection with the database using the properties file in JDBC?

Rishi Raj

Rishi Raj

Updated on 30-Jul-2019 22:30:26

1K+ Views

One of the variant of the getConnection() method of the DriverManager class accepts url of the database, (String format) a properties file and establishes connection with the database.Connection con = DriverManager.getConnection(url, properties);To establish a connection with a database using this method −Set the Driver class name as a system property −System.setProperty("Jdbc.drivers", ... Read More

Previous 1 ... 5 6 7 8 9 ... 13 Next
Advertisements