SlideShare a Scribd company logo
public class conexion {
Connection con;
public conexion(){
try {
Class.forName("com.mysql.jdbc.Driver");
con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/prueba","root","");
} catch (Exception e) {
System.err.println("Error:" +e);
}
}
public static void main(String[] args) {
conexion cn=new conexion();
Statement st;
ResultSet rs;
try {
st=cn.con.createStatement();
rs=st.executeQuery("select * from usuario");
while (rs.next()) {
System.out.println(rs.getInt("id")+" " +rs.getString("user"));
}
cn.con.close();
} catch (Exception e) {
}
}
}
Basedatos2
Basedatos2

More Related Content

What's hot

Es6 hackathon
Es6 hackathonEs6 hackathon
Es6 hackathon
Justin Alexander
 
Aspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdutionAspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdution
Adriano Mendes
 
JavaScript patterns
JavaScript patternsJavaScript patterns
JavaScript patterns
Norihito YAMAKAWA
 
Cross platform Objective-C Strategy
Cross platform Objective-C StrategyCross platform Objective-C Strategy
Cross platform Objective-C Strategy
Graham Lee
 
Php mysq
Php mysqPhp mysq
Php mysq
prasanna pabba
 
C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked list
Sourav Gayen
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
Darwin Durand
 
AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)
James Titcumb
 
MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applications
Matteo Pagani
 
Evernote ウェブサービスAPI
Evernote ウェブサービスAPIEvernote ウェブサービスAPI
Evernote ウェブサービスAPI
Fumihiro Kato
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
Darwin Durand
 
Understanding Functions and "this" in the World of ES2017+
Understanding Functions and "this" in the World of ES2017+Understanding Functions and "this" in the World of ES2017+
Understanding Functions and "this" in the World of ES2017+
Bryan Hughes
 
Clojure functions
Clojure functionsClojure functions
Clojure functions
Jackson dos Santos Olveira
 
Lock basicsexamples
Lock basicsexamplesLock basicsexamples
Lock basicsexamples
Mahabubur Rahaman
 
Transaction isolationexamples
Transaction isolationexamplesTransaction isolationexamples
Transaction isolationexamples
Mahabubur Rahaman
 
Opa presentation at GamesJs
Opa presentation at GamesJsOpa presentation at GamesJs
Opa presentation at GamesJs
Henri Binsztok
 
Clojure functions 3
Clojure functions 3Clojure functions 3
Clojure functions 3
Jackson dos Santos Olveira
 
Windows power shell and active directory
Windows power shell and active directoryWindows power shell and active directory
Windows power shell and active directory
Dan Morrill
 
FRP: What does "declarative" mean
FRP: What does "declarative" meanFRP: What does "declarative" mean
FRP: What does "declarative" mean
Peter Ovchinnikov
 
Deferred
DeferredDeferred
Deferred
daiying-zhang
 

What's hot (20)

Es6 hackathon
Es6 hackathonEs6 hackathon
Es6 hackathon
 
Aspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdutionAspdevice - Asp Fast Crud introdution
Aspdevice - Asp Fast Crud introdution
 
JavaScript patterns
JavaScript patternsJavaScript patterns
JavaScript patterns
 
Cross platform Objective-C Strategy
Cross platform Objective-C StrategyCross platform Objective-C Strategy
Cross platform Objective-C Strategy
 
Php mysq
Php mysqPhp mysq
Php mysq
 
C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked list
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
 
AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)
 
MVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applicationsMVVM e Caliburn Micro for Windows Phone applications
MVVM e Caliburn Micro for Windows Phone applications
 
Evernote ウェブサービスAPI
Evernote ウェブサービスAPIEvernote ウェブサービスAPI
Evernote ウェブサービスAPI
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
 
Understanding Functions and "this" in the World of ES2017+
Understanding Functions and "this" in the World of ES2017+Understanding Functions and "this" in the World of ES2017+
Understanding Functions and "this" in the World of ES2017+
 
Clojure functions
Clojure functionsClojure functions
Clojure functions
 
Lock basicsexamples
Lock basicsexamplesLock basicsexamples
Lock basicsexamples
 
Transaction isolationexamples
Transaction isolationexamplesTransaction isolationexamples
Transaction isolationexamples
 
Opa presentation at GamesJs
Opa presentation at GamesJsOpa presentation at GamesJs
Opa presentation at GamesJs
 
Clojure functions 3
Clojure functions 3Clojure functions 3
Clojure functions 3
 
Windows power shell and active directory
Windows power shell and active directoryWindows power shell and active directory
Windows power shell and active directory
 
FRP: What does "declarative" mean
FRP: What does "declarative" meanFRP: What does "declarative" mean
FRP: What does "declarative" mean
 
Deferred
DeferredDeferred
Deferred
 

More from Victor Zapata

consultas.pptx
consultas.pptxconsultas.pptx
consultas.pptx
Victor Zapata
 
10-Operadores+comparación.pdf
10-Operadores+comparación.pdf10-Operadores+comparación.pdf
10-Operadores+comparación.pdf
Victor Zapata
 
CONSULTADB.pptx
CONSULTADB.pptxCONSULTADB.pptx
CONSULTADB.pptx
Victor Zapata
 
mongodebdocumentos.pdf
mongodebdocumentos.pdfmongodebdocumentos.pdf
mongodebdocumentos.pdf
Victor Zapata
 
MONGODBCREAR.pptx
MONGODBCREAR.pptxMONGODBCREAR.pptx
MONGODBCREAR.pptx
Victor Zapata
 
011-Tipos+de+datos (1).pdf
011-Tipos+de+datos (1).pdf011-Tipos+de+datos (1).pdf
011-Tipos+de+datos (1).pdf
Victor Zapata
 
01-introduccion+json (1).pdf
01-introduccion+json (1).pdf01-introduccion+json (1).pdf
01-introduccion+json (1).pdf
Victor Zapata
 
05-Terminos+ (2).pdf
05-Terminos+ (2).pdf05-Terminos+ (2).pdf
05-Terminos+ (2).pdf
Victor Zapata
 
03-Versiones (1).pdf
03-Versiones (1).pdf03-Versiones (1).pdf
03-Versiones (1).pdf
Victor Zapata
 
01-IntroducciónMongoDB (2).pdf
01-IntroducciónMongoDB (2).pdf01-IntroducciónMongoDB (2).pdf
01-IntroducciónMongoDB (2).pdf
Victor Zapata
 
00-Bases+de+dato+noSQL (3).pdf
00-Bases+de+dato+noSQL (3).pdf00-Bases+de+dato+noSQL (3).pdf
00-Bases+de+dato+noSQL (3).pdf
Victor Zapata
 
0001-Contenido+del+curso+mongodb (2).pdf
0001-Contenido+del+curso+mongodb (2).pdf0001-Contenido+del+curso+mongodb (2).pdf
0001-Contenido+del+curso+mongodb (2).pdf
Victor Zapata
 
00-PRESENTACIÓN+DEL+CURSO (2).pdf
00-PRESENTACIÓN+DEL+CURSO (2).pdf00-PRESENTACIÓN+DEL+CURSO (2).pdf
00-PRESENTACIÓN+DEL+CURSO (2).pdf
Victor Zapata
 
pptBC5D.pptm [Autoguardado].pdf
pptBC5D.pptm [Autoguardado].pdfpptBC5D.pptm [Autoguardado].pdf
pptBC5D.pptm [Autoguardado].pdf
Victor Zapata
 
Norma.ISO.31000.2018.Espanol.pdf
Norma.ISO.31000.2018.Espanol.pdfNorma.ISO.31000.2018.Espanol.pdf
Norma.ISO.31000.2018.Espanol.pdf
Victor Zapata
 
Analisis_de_riesgo_usando_la_metodologia_OWASP.pdf
Analisis_de_riesgo_usando_la_metodologia_OWASP.pdfAnalisis_de_riesgo_usando_la_metodologia_OWASP.pdf
Analisis_de_riesgo_usando_la_metodologia_OWASP.pdf
Victor Zapata
 
Gestion
GestionGestion
Gestion
Victor Zapata
 
Cualitativaestudiodecaso
CualitativaestudiodecasoCualitativaestudiodecaso
Cualitativaestudiodecaso
Victor Zapata
 
Paradigmas (1)
Paradigmas  (1)Paradigmas  (1)
Paradigmas (1)
Victor Zapata
 
Deber
DeberDeber

More from Victor Zapata (20)

consultas.pptx
consultas.pptxconsultas.pptx
consultas.pptx
 
10-Operadores+comparación.pdf
10-Operadores+comparación.pdf10-Operadores+comparación.pdf
10-Operadores+comparación.pdf
 
CONSULTADB.pptx
CONSULTADB.pptxCONSULTADB.pptx
CONSULTADB.pptx
 
mongodebdocumentos.pdf
mongodebdocumentos.pdfmongodebdocumentos.pdf
mongodebdocumentos.pdf
 
MONGODBCREAR.pptx
MONGODBCREAR.pptxMONGODBCREAR.pptx
MONGODBCREAR.pptx
 
011-Tipos+de+datos (1).pdf
011-Tipos+de+datos (1).pdf011-Tipos+de+datos (1).pdf
011-Tipos+de+datos (1).pdf
 
01-introduccion+json (1).pdf
01-introduccion+json (1).pdf01-introduccion+json (1).pdf
01-introduccion+json (1).pdf
 
05-Terminos+ (2).pdf
05-Terminos+ (2).pdf05-Terminos+ (2).pdf
05-Terminos+ (2).pdf
 
03-Versiones (1).pdf
03-Versiones (1).pdf03-Versiones (1).pdf
03-Versiones (1).pdf
 
01-IntroducciónMongoDB (2).pdf
01-IntroducciónMongoDB (2).pdf01-IntroducciónMongoDB (2).pdf
01-IntroducciónMongoDB (2).pdf
 
00-Bases+de+dato+noSQL (3).pdf
00-Bases+de+dato+noSQL (3).pdf00-Bases+de+dato+noSQL (3).pdf
00-Bases+de+dato+noSQL (3).pdf
 
0001-Contenido+del+curso+mongodb (2).pdf
0001-Contenido+del+curso+mongodb (2).pdf0001-Contenido+del+curso+mongodb (2).pdf
0001-Contenido+del+curso+mongodb (2).pdf
 
00-PRESENTACIÓN+DEL+CURSO (2).pdf
00-PRESENTACIÓN+DEL+CURSO (2).pdf00-PRESENTACIÓN+DEL+CURSO (2).pdf
00-PRESENTACIÓN+DEL+CURSO (2).pdf
 
pptBC5D.pptm [Autoguardado].pdf
pptBC5D.pptm [Autoguardado].pdfpptBC5D.pptm [Autoguardado].pdf
pptBC5D.pptm [Autoguardado].pdf
 
Norma.ISO.31000.2018.Espanol.pdf
Norma.ISO.31000.2018.Espanol.pdfNorma.ISO.31000.2018.Espanol.pdf
Norma.ISO.31000.2018.Espanol.pdf
 
Analisis_de_riesgo_usando_la_metodologia_OWASP.pdf
Analisis_de_riesgo_usando_la_metodologia_OWASP.pdfAnalisis_de_riesgo_usando_la_metodologia_OWASP.pdf
Analisis_de_riesgo_usando_la_metodologia_OWASP.pdf
 
Gestion
GestionGestion
Gestion
 
Cualitativaestudiodecaso
CualitativaestudiodecasoCualitativaestudiodecaso
Cualitativaestudiodecaso
 
Paradigmas (1)
Paradigmas  (1)Paradigmas  (1)
Paradigmas (1)
 
Deber
DeberDeber
Deber
 

Recently uploaded

RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 

Recently uploaded (20)

RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 

Basedatos2

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. public class conexion { Connection con; public conexion(){ try { Class.forName("com.mysql.jdbc.Driver"); con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/prueba","root",""); } catch (Exception e) { System.err.println("Error:" +e); } } public static void main(String[] args) { conexion cn=new conexion(); Statement st; ResultSet rs; try { st=cn.con.createStatement(); rs=st.executeQuery("select * from usuario"); while (rs.next()) { System.out.println(rs.getInt("id")+" " +rs.getString("user")); } cn.con.close(); } catch (Exception e) { } } }