118k views
5 votes
Which of the following database operations does NOT use the ExecuteNonQuery method?

a. Insert a column
b. Delete a column
c. Select the maximum value from a column
d. Update a column

User Fane
by
7.9k points

1 Answer

0 votes

Final answer:

The operation that does NOT use the ExecuteNonQuery method is 'Select the maximum value from a column,' since ExecuteNonQuery is used for operations that change data but do not return data.

Step-by-step explanation:

The question relates to the use of the ExecuteNonQuery method in database operations. The ExecuteNonQuery method is used for performing a command that will change the data in the database but will not return any data, such as inserting, updating, or deleting records.

Among the choices provided:

Insert a column - uses ExecuteNonQuery as it modifies the database schema.

Delete a column - also uses ExecuteNonQuery because it alters the structure of the database.

Select the maximum value from a column - does not use ExecuteNonQuery as it is a query that returns data.

Update a column - uses ExecuteNonQuery since it changes existing data without returning any.

Therefore, the operation that does NOT use the ExecuteNonQuery method is c. Select the maximum value from a column.

User Fuzzzzel
by
7.3k points