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
  • PEGA Testing Training
  • Today application testing is the deciding factor to launch the application into the market. And people do not launch the application unless it goes true.

  • Blockchain Online Course
  • Today many people were enthusiastic, to know the exact details of things happening around him. This can get the proper knowledge on Blockchain.

  • Ethical Hacking Online Course
  • Zeal to learn ethical hacking is common among college students and IT professionals. Because everybody wants to secure their system from cyber attacks.

  • Python Online Training
  • Python is a dynamic interrupted language which is used in wide varieties of applications. It is very interactive object oriented and high-level programming language.

  • Tableau Training
  • Tableau is a Software company that caters interactive data visualization products that provide Business Intelligence services. The company’s Head Quarters is in Seattle, USA.

  • PEGA Online Training
  • Pega Systems Inc. is a Cambridge, Massachusetts based Software Company. It is known for developing software for Customer Relationship Management (CRM) and Business process Management (BPM).


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