ResultSet executeQuery(String sql) throws SQLException - This method is used for SQL statements which retrieve some data from the database. For example - SELECT statement. This method is meant to be used for select queries which fetch some data from the database. This method returns one java.sql.ResultSet object which contains the data returned by the query.
int executeUpdate(String sql) throws SQLException - This method is used for SQL statements which update the database in some way. For example - INSERT, UPDATE and DELETE statements. All these statements are DML(Data Manipulation Language) statements. This method can also be used for DDL(Data Definition Language) statements which return nothing. For example CREATE and ALTER statements. This method returns an int value which represents the number of rows affected by the query. This value will be 0 for the statements which return nothing.
boolean execute(String sql) throws SQLException - This method can be used for all types of SQL statements. If you don’t know which method to use for your SQL statements, then this method can be the best option. This method returns a boolean value. TRUE indicates that statement has returned a ResultSet object and FALSE indicates that statement has returned an int value or returned nothing.
SET ENVIRONMENT VARIABLES IN WINDOWS
Right click on Computer → Properties → Advanced system settings
In Advanced tab click on Environment Variables... button
Set the environment variables listed below :
|PATH||C:\Program Files\Java\jdk1.8.0_112\bin;C:\Program Files\Java\jre1.8.0_112\bin|
IGNOU Assignment Solution
IGNOU Question Paper Solution
Solutions of Different Questions
WHAT WE DO
Provide BCA, MCA Projects
Provide Assignment & Question Paper Solution