- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 4336 Articles for Java 8
![Vikyath Ram](https://www.tutorialspoint.com/assets/profiles/13780/profile/60_74413-1512648006.jpg)
86 Views
This method retrieves the list of System functions supported by the current database. The names returned by this method are the Open CLI System function names.This method returns a String value holding the list of functions separated by commas (", ").To get the list of the System functions supported by the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user ... Read More
![Vikyath Ram](https://www.tutorialspoint.com/assets/profiles/13780/profile/60_74413-1512648006.jpg)
209 Views
The getStringFunctions() method of the Connection interface retrieves the list of String functions supported by the current database. The names returned by this method are the Open CLI String function names.This method returns a String value holding the list of functions separated by commas (", ").To get the list of the String functions supported by the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the ... Read More
![Vikyath Ram](https://www.tutorialspoint.com/assets/profiles/13780/profile/60_74413-1512648006.jpg)
142 Views
The getNumeric() method of the Connection interface retrieves the list of math functions supported by the current database. The names returned by this method are the Open CLI math function names.This method returns a String value holding the list of functions separated by commas (", ").To get the list of the numeric functions supported by the underlying database −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the ... Read More
![Vikyath Ram](https://www.tutorialspoint.com/assets/profiles/13780/profile/60_74413-1512648006.jpg)
5K+ Views
The commit() method of the Connection interface saves all the modifications made since the last commit.con.save()If any issue occurs after the commit you can revert all the changes done till this commit by invoking the rollback() method.Con.rollback()To commit a transactionRegister the driver using the registerDriver() method of the DriverManager class as −//Registering the Driver DriverManager.registerDriver(new com.mysql.jdbc.Driver());Get the connection using the getConnection() method of the DriverManager class as −//Getting the connection String url = "jdbc:mysql://localhost/mydatabase"; Connection con = DriverManager.getConnection(url, "root", "password");Turn off the auto-commit using the setAutoCommit() method as −//Setting the auto commit false con.setAutoCommit(false);Commit the transaction using the commit() method as −con.commit();Let us create a table with ... Read More
![Arushi](https://www.tutorialspoint.com/assets/profiles/13510/profile/60_55588-1512537391.jpg)
2K+ Views
In a database system, where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction. Transaction Isolation Levels in Java Connection JDBC (Java Database Connectivity) provides support 5 transaction isolation levels through Connection interface. TRANSACTION_NONE: It is represented by integer value 0 does not support transactions. TRANSACTION_READ_COMMITTED: It is represented by integer value 2 supports ... Read More
![Rishi Raj](https://www.tutorialspoint.com/assets/profiles/13777/profile/60_73169-1512647303.jpg)
458 Views
In a database system where more than one transaction is being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.JDBC provides support 5 transaction isolation levels through Connection interface.TRANSACTION_NONE: It is represented by integer value 0 does not support transactions.TRANSACTION_READ_COMMITTED: It is represented by integer value 2 supports transactions allowing Non-Repeatable Reads and, Phantom Reads.TRANSACTION_READ_UNCOMMITTED: It is represented by integer value 1 supports transactions allowing Dirty Reads, Non-Repeatable Reads ... Read More
![Arushi](https://www.tutorialspoint.com/assets/profiles/13510/profile/60_55588-1512537391.jpg)
1K+ Views
The getClientInfo() method of the Connection interface returns the name and values of the client info properties of the current connection. This method returns a properties object.To retrieve the values of the client info properties file.Register the driver using the registerDriver() method of the DriverManager class as −//Registering the Driver DriverManager.registerDriver(new com.mysql.jdbc.Driver());Get the connection using the getConnection() method of the DriverManager class as −//Getting the connection String url = "jdbc:mysql://localhost/mydatabase"; Connection con = DriverManager.getConnection(url, "root", "password");Create a properties object as −Properties properties = new Properties();Add the required key-value pairs to the above created Properties object as −properties.put("user_name", "new_user"); properties.put("password", "password");Set the above ... Read More
![Vikyath Ram](https://www.tutorialspoint.com/assets/profiles/13780/profile/60_74413-1512648006.jpg)
750 Views
The setClientInfo() method of the Connection interface sets values to the client info properties of the current connection object.ParametersThis method accepts a Properties object as a parameter.con.setClientInfo(properties);To set values to the client info properties file.Register the driver using the registerDriver() method of the DriverManager class as −//Registering the Driver DriverManager.registerDriver(new com.mysql.jdbc.Driver());Get the connection using the getConnection() method of the DriverManager class as −//Getting the connection String url = "jdbc:mysql://localhost/mydatabase"; Connection con = DriverManager.getConnection(url, "root", "password");Create a properties object as −Properties properties = new Properties();Add the required key-value pairs to the above created Properties object as −properties.put("user_name", "new_user"); properties.put("password", "password");Set the above created ... Read More
![Rishi Raj](https://www.tutorialspoint.com/assets/profiles/13777/profile/60_73169-1512647303.jpg)
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", "com.mysql.jdbc.Driver");Create a properties object as −Properties properties = new Properties();Add the user name and password to the above created Properties object as −properties.put("user", "root"); properties.put("password", "password");Finally invoke the getConnection() method of the DriverManager class by passing the URL and, properties object as parameters.//Getting the connection String url = "jdbc:mysql://localhost/mydatabase"; Connection con = ... Read More
![Arushi](https://www.tutorialspoint.com/assets/profiles/13510/profile/60_55588-1512537391.jpg)
2K+ Views
Generally, Data about data is known as metadata. The DatabaseMetaData interface provides methods to get information about the database you have connected with like, database name, database driver version, maximum column length etc...The getMetaData() method of the Connection interface retrieves and returns the DatabaseMetaData object. This contains information about the database you have connected to. You can get information about the database such as name of the database, version, driver name, user name and, url etc… by invoking the methods of the DatabaseMetaData interface using the obtained object.This method returns the DatabaseMetaData object which holds information about the underlying database.To get ... Read More