SELECT *

Use of the “SELECT *” form of the SQL SELECT clause is acceptable in situations where the specific columns involved, and their left to right ordering, are both irrelevant—for example, in an EXISTS invocation. It can be dangerous in other situations, however, because the meaning of that “*” can change if (e.g.) new columns are added to an existing table. Recommendation: Be on the lookout for such situations and try to avoid them. In particular, don’t use “SELECT *” at the outermost level in a cursor definition—instead, always name the pertinent columns explicitly. A similar remark applies to view definitions also. (However, if you adopt the strategy suggested under the discussion of column naming in Chapter 3 of always accessing the database via views—the “operate via views” strategy—then it might be safe to use “SELECT *” anywhere you like other than in the definitions of those views themselves.)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.162.76