COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
How can you execute DML statements (i.e. insert, delete, update) in the database?
|
By making use of the InsertStatement, DeleteStatement or UpdateStatement classes
|
|
By invoking the execute( ____ ) or executeUpdate( ____ ) method of a normal Statement object or a sub-interface object thereof
|
|
By invoking the executeInsert( ____ ), executeDelete( ____ ) or executeUpdate( ____ ) methods of the DataModificationStatement object
|
|
By making use of the execute( ____ ) statement of the DataModificationStatement object
|
Explanation:
Detailed explanation-1: -The primary DML statements are SELECT, INSERT, DELETE, and UPDATE . With the exception of SELECT statements, all of the others are only applicable to data within tables in a database.
Detailed explanation-2: -Use the executeUpdate method for DML SQL queries that change data in the database, such as INSERT, UPDATE and DELETE which do not return a result set.
There is 1 question to complete.