Re: RE: Is it possible to insert column between existing columns using the alter table wizard?
Joseph Charpak <[email protected]>
| Newsgroups | gmane.comp.db.oracle.toad.free |
|---|---|
| Message-ID | <[email protected]> |
Exactly. Not having a column list in the insert portion is just like select *. Fine for quick and dirty, but not intended for production quality code. On 05/24/2012 01:44 PM, Simoneau, Roger wrote: > > Which is exactly why I have a best practice of: > > INSERT INTO some_table ( > > COL1, COL2, COL3) > > VALUES (VAL1, VAL2, VAL3); > > That insert won't suddenly break on you unless the change itself > affects an underlying key component. Such as adding a new column that > requires a non-null value. > > Roger S. > > *From:*[email protected] [mailto:[email protected]] *On Behalf > Of *Stephen Beausang > *Sent:* Thursday, May 24, 2012 11:41 AM > *To:* [email protected] > *Subject:* [toad] RE: Is it possible to insert column between existing > columns using the alter table wizard? > > L, I have come across a few situations where this is critical, for > backward compatibility. The code says something like ÃNSERT INTO > MYTABLE VALUES(1,"SOME VALUE", etc). If you move the columns, the > existing code breaks . > > Stephen > > > ------------------------------------------------------------------------ > This communication, including any attached documentation, is intended > only for the person or entity to which it is addressed, and may > contain confidential, personal and/or privileged information. Any > unauthorized disclosure, copying, or taking action on the contents is > strictly prohibited. If you have received this message in error, > please contact us immediately so we may correct our records. Please > then delete or destroy the original transmission and any subsequent reply. >