A Gentle Introduction to


We use can connect to an SQL engine using JDBC. You will need to obtain a JDBC driver from the appropriate database. googleUtilizamos podemos conectar con un motor del SQL que usa a JDBC. You necesitaremos obtener un conductor de JDBC de la base de datos apropiada.

You need to compile and execute the java from the command prompt: googleUsted necesita compilar y ejecutar la Java del aviso de comando:

javac CIA.java
java -classpath "C:/thingies/mysql-connector-java-2.0.14;." CIA
/* CIA.java
   From https://sqlpass-latam.org By Andrew Cumming
import java.sql.*;
public class CIA{
  public static void main(String[] args){
    Connection myCon;
    Statement myStmt;
      // Connect to an instance of mysql with the follow details:
      // machine address: pc236nt.napier.ac.uk
      // database       : gisq
      // user name      : scott
      // password       : tiger
      myCon = DriverManager.getConnection(
      myStmt = myCon.createStatement();
      ResultSet result = myStmt.executeQuery(
         "SELECT * FROM cia WHERE population>200000000");
      while (result.next()){
    catch (Exception sqlEx){

It should respond with the names of four countries.googleDebe responder con los nombres de cuatro países.