The SQL SELECT statement retrieves one or more table rows based on matching a predicate. We will work with the same pet table from the previous lesson. Copy and execute the following SQL statements in ...
PreparesStatementクラスが前回説明した接続プールのConnectionクラスのconnection変数を使って引数に入れたsqlをデータベースへ送ります。 またデータを更新する処理を行った場合はメソッドの最後でconnection.commit()をする必要があり、それで更新が完了される。