Java Utililty Methods SQL Query

List of utility methods to do SQL Query

Description

The list of methods to do SQL Query are organized into topic(s).

Method

StringrunSqlSelect(String sqlQuery, Connection databaseConnection)
run Sql Select
StringBuilder queryResult = new StringBuilder();
try (PreparedStatement preparedStatement = databaseConnection.prepareStatement(sqlQuery)) {
    try (ResultSet actualResultSet = preparedStatement.executeQuery()) {
        ResultSetMetaData metaData = actualResultSet.getMetaData();
        boolean isFirstRow = true;
        int columnsCount = metaData.getColumnCount();
        while (actualResultSet.next()) {
            if (!isFirstRow) {
...