Vikyath Ram has Published 169 Answers

Merging 2 tables with similar column name SAP HANA database

Vikyath Ram

Vikyath Ram

Updated on 05-Dec-2019 09:11:29

This can be done by using UNION or UNION ALL operator as followsselect id, Empl_name, DeptId from table1 union select id, Empl_name, DeptId from table2 The difference between UNION and UNION ALL is that UNION removes the duplicates while UNION ALL shows duplicates as well.

The ResultSet updateRow() method with example

Vikyath Ram

Vikyath Ram

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

When we execute certain SQL queries (SELECT query in general) they return tabular data.The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQuery() method of the Statement interface in ... Read More

Java ResultSetMetaData getColumnDisplaySize() method with example

Vikyath Ram

Vikyath Ram

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

The getColumnDisplaySize() method of the ResultSetMetaData (interface) retrieves the display size of a particular column.This method returns an integer value representing the display size of the column.To get the ResultSetMetaData object, you need to −Register the Driver: Select the required database register the Driver class of the particular database using ... Read More

Java ResultSetMetaData getColumnTypeName() method with example

Vikyath Ram

Vikyath Ram

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

The getColumnTypeName() method of the ResultSetMetaData (interface) retrieves and returns the name of the datatype of the specified column in the current ResultSet object.This method accepts an integer value representing the index of a column and, returns a String value representing the name of the SQL data type of the specified ... Read More

Java DatabaseMetaData supportsSavepoints() method with example

Vikyath Ram

Vikyath Ram

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

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

Java DatabaseMetaData supportsTransactions() method with example

Vikyath Ram

Vikyath Ram

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

The supportsTransactions() method of the DatabaseMetaData interface is used to determine whether the underlying database supports transactions.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 your ... Read More

Java DatabaseMetaData supportsResultSetType() method with example

Vikyath Ram

Vikyath Ram

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

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 ... Read More

What is CLOSE_CURSORS_AT_COMMIT in JDBC?

Vikyath Ram

Vikyath Ram

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

CLOSE_CURSORS_AT_COMMIT is the constant value of the ResultSet interface representing the holdability value. If the ResultSet holdability is set to this value whenever you commit/save a transaction using the commit() method of the Connection interface, the ResultSet objects created in the current transaction (that are already opened) will be closed.Let ... Read More

Java Connection setSavepoint() method with example

Vikyath Ram

Vikyath Ram

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

A save point is a logical rollback point within a transaction. When you set a save point, whenever an error occurs past a save point, you can undo the events you have done up to the save point using the rollback() method.You can set a save point in a database ... Read More

Java Connection rollBack() method with example

Vikyath Ram

Vikyath Ram

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

A rollback operation undoes all the changes done by the current transaction i.e. If you call a rollBack() method of the Connection interface, all the modifications are reverted until the last commit.Con.rollback()You can also rollback the changes in the database up to a particular save point by passing the required Savepoint ... Read More

Advertisements