este problema se puede abordar de diferentes formas, por lo tanto te compartimos la que para nosotros es la respuesta más completa.
Ejemplo: crear declaración en jdbc
Connection=Helps our java project connect todatabaseStatement=Helpstowrite and execute SQL query
ResultSet=ADataStructure where the data from query result stored
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++After succesfully created the connect
next step is STATEMENT
Statement statement = connection.createStatement();We use createStatement() method tocreate
the statement from our connection.-The result we get from this type of statement
can only move from top tobottom,
not other way around
Statement statement = connection.createStatement(ResultSet TYPE_SCROLL_INSENSITIVE
,ResultSet CONCUR_READ_ONLY);-The result we get from this type of
statement can freely move between rows
Once we have statement we can run
the query and get the result toResultSet format
importjava.sql.ResultSet;We use the method executeQuery()toexecute our queries
ResultSet result = statement.executeQuery("Select * from employees");
valoraciones y comentarios
Más adelante puedes encontrar las críticas de otros sys admins, tú igualmente eres capaz dejar el tuyo si te apetece.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)