SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
methods for

It can not directly be created in code; instead, the Connection interface is created by the
Driver.connect() method.
This method creates a Statement object associated with this Connection session.
This method provides a PreparedStatement object to be associated with this Connection session.
•
•
boolean execute
(
String Sql
)

ResultSet executeQuery
(
String Sql
)

int executeUpdate
(
String Sql
)

1.

It allows us to execute the Statement when we do not
know if it is a query or an update.

2.

It may return multiple results.

3. Use getResultSet to retrieve the ResultSet.

Executes the SQL string and returns a single
ResultSet object.

Executes a SQL string, which must be an
INSERT,UPDATE, DELETE, or a statement that
doesn’t return anything.
Example: Select
Example: Insert
Example: Delete
•
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2

Contenu connexe

Tendances

Chapter 6.2
Chapter 6.2Chapter 6.2
Chapter 6.2sotlsoc
 
Design Pattern - Observer Pattern
Design Pattern - Observer PatternDesign Pattern - Observer Pattern
Design Pattern - Observer PatternMudasir Qazi
 
What is new on ES6
What is new on ES6What is new on ES6
What is new on ES6Huge
 
Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6helpido9
 
Achieving with Reactive Extensions
Achieving with Reactive ExtensionsAchieving with Reactive Extensions
Achieving with Reactive ExtensionsSean McCarthy
 
Vuex: X factor for Vue
Vuex: X factor for VueVuex: X factor for Vue
Vuex: X factor for VueAkansh Gulati
 
Observer design pattern
Observer design patternObserver design pattern
Observer design patternSara Torkey
 
Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...
Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...
Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...Waqas Tariq
 
Getting your data in and out of elasticsearch: let me count the ways
Getting your data in and out of elasticsearch: let me count the waysGetting your data in and out of elasticsearch: let me count the ways
Getting your data in and out of elasticsearch: let me count the ways🥑 Jay Miller
 

Tendances (14)

ASP.NET- database connectivity
ASP.NET- database connectivityASP.NET- database connectivity
ASP.NET- database connectivity
 
Data Applied: Association
Data Applied: AssociationData Applied: Association
Data Applied: Association
 
Chapter 6.2
Chapter 6.2Chapter 6.2
Chapter 6.2
 
Design Pattern - Observer Pattern
Design Pattern - Observer PatternDesign Pattern - Observer Pattern
Design Pattern - Observer Pattern
 
What is new on ES6
What is new on ES6What is new on ES6
What is new on ES6
 
RxSubject And Operators
RxSubject And OperatorsRxSubject And Operators
RxSubject And Operators
 
Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6
 
Achieving with Reactive Extensions
Achieving with Reactive ExtensionsAchieving with Reactive Extensions
Achieving with Reactive Extensions
 
A04
A04A04
A04
 
Servlet session 9
Servlet   session 9Servlet   session 9
Servlet session 9
 
Vuex: X factor for Vue
Vuex: X factor for VueVuex: X factor for Vue
Vuex: X factor for Vue
 
Observer design pattern
Observer design patternObserver design pattern
Observer design pattern
 
Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...
Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...
Reconstruction of a Complete Dataset from an Incomplete Dataset by ARA (Attri...
 
Getting your data in and out of elasticsearch: let me count the ways
Getting your data in and out of elasticsearch: let me count the waysGetting your data in and out of elasticsearch: let me count the ways
Getting your data in and out of elasticsearch: let me count the ways
 

En vedette

Professionas Iq Test
Professionas Iq TestProfessionas Iq Test
Professionas Iq Testheldeen
 
Online Video presentation
Online Video presentationOnline Video presentation
Online Video presentationtbartlett21
 
Social, Mobile and Media Convergence
Social, Mobile and Media ConvergenceSocial, Mobile and Media Convergence
Social, Mobile and Media ConvergenceKevin Davis
 
Travel Agents
Travel Agents Travel Agents
Travel Agents JhoanCross
 
Red apple mixx rules
Red apple mixx rulesRed apple mixx rules
Red apple mixx rulesRedAppleMIXX
 
Java DataBase Connectivity -JDBC Part-1
Java DataBase Connectivity -JDBC Part-1Java DataBase Connectivity -JDBC Part-1
Java DataBase Connectivity -JDBC Part-1Pranil Dukare
 
business environment
business environmentbusiness environment
business environmentBhupen Sharma
 
Demystifying of Accounting Equation
Demystifying of Accounting EquationDemystifying of Accounting Equation
Demystifying of Accounting EquationKanik Vijay
 
Social media & juice plus+
Social media &  juice plus+Social media &  juice plus+
Social media & juice plus+Michele Sahm
 
Lighteninginajar
LighteninginajarLighteninginajar
Lighteninginajartlmauro
 
Aspiring Minds
Aspiring MindsAspiring Minds
Aspiring Mindsheldeen
 
Screening for disease (ravi)
Screening for disease (ravi)Screening for disease (ravi)
Screening for disease (ravi)Ravikant
 
Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...
Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...
Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...Alan Mirko Poldrugac, MSc, PMP
 

En vedette (20)

Rancangan pengajaran harian
Rancangan pengajaran harianRancangan pengajaran harian
Rancangan pengajaran harian
 
Professionas Iq Test
Professionas Iq TestProfessionas Iq Test
Professionas Iq Test
 
Windows 8 Features
Windows 8 Features Windows 8 Features
Windows 8 Features
 
Online Video presentation
Online Video presentationOnline Video presentation
Online Video presentation
 
Social, Mobile and Media Convergence
Social, Mobile and Media ConvergenceSocial, Mobile and Media Convergence
Social, Mobile and Media Convergence
 
Travel Agents
Travel Agents Travel Agents
Travel Agents
 
Red apple mixx rules
Red apple mixx rulesRed apple mixx rules
Red apple mixx rules
 
Villa Tany
Villa TanyVilla Tany
Villa Tany
 
Mysql
MysqlMysql
Mysql
 
Samtalet pp
Samtalet ppSamtalet pp
Samtalet pp
 
Java DataBase Connectivity -JDBC Part-1
Java DataBase Connectivity -JDBC Part-1Java DataBase Connectivity -JDBC Part-1
Java DataBase Connectivity -JDBC Part-1
 
business environment
business environmentbusiness environment
business environment
 
Demystifying of Accounting Equation
Demystifying of Accounting EquationDemystifying of Accounting Equation
Demystifying of Accounting Equation
 
Social media & juice plus+
Social media &  juice plus+Social media &  juice plus+
Social media & juice plus+
 
Lighteninginajar
LighteninginajarLighteninginajar
Lighteninginajar
 
тогда и сейчас
тогда и сейчастогда и сейчас
тогда и сейчас
 
Aspiring Minds
Aspiring MindsAspiring Minds
Aspiring Minds
 
Screening for disease (ravi)
Screening for disease (ravi)Screening for disease (ravi)
Screening for disease (ravi)
 
EMBRAER
EMBRAEREMBRAER
EMBRAER
 
Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...
Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...
Case Study: How we achieved 95% automation with IBM Rational Quality Manageme...
 

Similaire à Java DataBase Connectivity - JDBC Part-2 (20)

J unit presentation
J unit presentationJ unit presentation
J unit presentation
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
JDBC for CSQL Database
JDBC for CSQL DatabaseJDBC for CSQL Database
JDBC for CSQL Database
 
Jdbc api
Jdbc apiJdbc api
Jdbc api
 
Junit and testNG
Junit and testNGJunit and testNG
Junit and testNG
 
Junit
JunitJunit
Junit
 
JDBC – Java Database Connectivity
JDBC – Java Database ConnectivityJDBC – Java Database Connectivity
JDBC – Java Database Connectivity
 
statement interface
statement interface statement interface
statement interface
 
Acutate - Using Stored Procedure
Acutate - Using Stored ProcedureAcutate - Using Stored Procedure
Acutate - Using Stored Procedure
 
Effective Unit Test Style Guide
Effective Unit Test Style GuideEffective Unit Test Style Guide
Effective Unit Test Style Guide
 
Unit test
Unit testUnit test
Unit test
 
ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0ADO.Net Improvements in .Net 2.0
ADO.Net Improvements in .Net 2.0
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
 
Unit Testing in .NET Core 7.0 with XUnit.pptx
Unit Testing in .NET Core 7.0 with XUnit.pptxUnit Testing in .NET Core 7.0 with XUnit.pptx
Unit Testing in .NET Core 7.0 with XUnit.pptx
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
 
SQLCLR Tips & Trics
SQLCLR Tips & TricsSQLCLR Tips & Trics
SQLCLR Tips & Trics
 
3-ADO.NET.pdf
3-ADO.NET.pdf3-ADO.NET.pdf
3-ADO.NET.pdf
 
Frontend training
Frontend trainingFrontend training
Frontend training
 

Dernier

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 

Dernier (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

Java DataBase Connectivity - JDBC Part-2

  • 1.
  • 2.
  • 3.
  • 4. methods for It can not directly be created in code; instead, the Connection interface is created by the Driver.connect() method.
  • 5. This method creates a Statement object associated with this Connection session.
  • 6. This method provides a PreparedStatement object to be associated with this Connection session.
  • 8.
  • 9. boolean execute ( String Sql ) ResultSet executeQuery ( String Sql ) int executeUpdate ( String Sql ) 1. It allows us to execute the Statement when we do not know if it is a query or an update. 2. It may return multiple results. 3. Use getResultSet to retrieve the ResultSet. Executes the SQL string and returns a single ResultSet object. Executes a SQL string, which must be an INSERT,UPDATE, DELETE, or a statement that doesn’t return anything.
  • 11.
  • 12.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.