ResultSetMetaData

ResultSetMetaData :

The metadata implies information about information i.e. we can get additional data from the information.

In the event that you need to get metadata of a table like aggregate number of segment, section name, segment sort and so forth, ResultSetMetaData interface is helpful in light of the fact that it gives strategies to get metadata from the ResultSet question.

METHODS OF RESULTSETMETADATA :

Methods of ResultSetMetaData

object of ResultSetMetaData:

The getMetaData() method of ResultSet interface returns proceeds the entity of ResultSetMetaData

Syntax:

  public ResultSetMetaData getMetaData()throws SQLException

 DatabaseMetaData:

DatabaseMetaData interface gives techniques to get meta information of a database, for example, database item name, database item form, driver name, name of aggregate number of tables, name of aggregate number of perspectives and so forth.

 Methods of DatabaseMetaData:

  • public String getDriverName()throws SQLException
  • public String getDriverVersion()throws SQLException
  • public String getUserName()throws SQLException
  • public String getDatabaseProductName()throws SQLException
  • public String getDatabaseProductVersion()throws SQLException
  • public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)throws SQLException
Object of DatabaseMetaData:

The getMetaData() method of link line returns the object of DatabaseMetaData.

Syntax:

public DatabaseMetaData getMetaData()throws SQLException

Example:

import java.sql.*;

class Dbmd2{

try{

Class.forName(“oracle.jdbc.driver.OracleDriver”);

public static void main(String args[]){

Connection con=DriverManager.getConnection(

“jdbc:oracle:thin:@localhost:1521:xe”,”system”,”oracle”);

DatabaseMetaData dbmd=con.getMetaData();

String table[]={“TABLE”};

ResultSet rs=dbmd.getTables(null,null,null,table);

while(rs.next()){

System.out.println(rs.getString(3));

}  con.close();

}catch(Exception e){ System.out.println(e);}

}

}

Transaction Management:

Exchange speaks to a solitary unit of work. The ACID properties depicts the exchange administration well. Corrosive stands for Atomicity, Consistency, confinement and toughness.

Atomic implies either all effective or none. Consistency guarantees bringing the database starting with one reliable state then onto the next predictable state. Confinement guarantees that exchange is disconnected from other exchange. Toughness implies once an exchange has been conferred, it will remain along these lines, even in case of blunders, control misfortune and so on.

 Methods:

void setAutoCommit(boolean status)

void rollback()

void commit()

Subscribe
to our newsletter

Drop Us A Query

Trending Courses
  • Selenium with python
    Selenium with Python Training
  • As we know, that Selenium with Python Web Browser Selenium Automation is Gaining Popularity Day by Day. So many Frameworks and Tools Have arisen to get Services to Developers.

  • Deep learning course
    Deep Learning Course
  • Artificial Intelligence, Deep mastering (DL) is completely about, many levels of Representation and sort of abstraction. That guide to design a sense of Information like Images, sound and text format.

  • machine learning with python
    Machine Learning with Python Training
  • Over last few years, Big Data and analysis have come up, with Exponential and modified Direction of Business. That operate Python, emerged with a fast and strong Contender for going with Predictive Analysis.

  • Data science with R
    Data Science With R Training
  • Understanding and using Linear, non-linear regression Models and Classifying techniques for stats analysis. Hypothesis testing sample methods, to get business decisions.

  • data science with python
    Data Science with Python Training
  • Everyone starts Somewhere, first you learn basics of Every Scripting concept. Here you need complete Introduction to Data Science python libraries Concepts.

  • devops with azure
    Devops with Azure Training
  • As we Know Azure DevOps is a Bunch of Services, in guiding Developers. It contains CI/CD, pipelines, code Repositories, Visual Reporting Tools and more code management with version control.


100% Secure Payments. All major credit & debit cards accepted.