Interview Questions

Why SELECT * is not preferred in embedded SQL programs?

DB2 INTERVIEW QUESTIONS


(Continued from previous question...)

Why SELECT * is not preferred in embedded SQL programs?

For three reasons:
If the table structure is changed ( a field is added ), the program will have to be modified
Program might retrieve the columns which it might not use, leading on I/O over head.
The chance of an index only scan is lost.

(Continued on next question...)

Other Interview Questions