Greetings All,
I'm a Consultant working on a Client Site and they have their own development standards that our development team must adhere to. One of their general SQL Rules is "SELECT..INTO must NEVER be used" and I can not fathom a reason for it. They have not explained why they are mandating this. I've worked with Oracle for 25 years (9 of those with Oracle itself) and I have used SELECT..INTO many times for queries with single-row results to be assigned into variables or for selecting a count of rows into a variable (which is probably my most common usage of SELECT..INTO). I have never heard of any problems while using this construct.
The only thing I have seen in google searches is an article that says SELECT..INTO should not be used for creating tables in SQL Server as it provides no performance advantage and can in fact cause performance degredation, but that is SQL Server not Oracle. I'm guessing that SELECT..INTO in SQL Server is similar to using CREATE TABLE AS SELECT in Oracle.
Can anybody please tell me if there are any major reasons why SELECT..INTO should not be used in Oracle SQL or PL/SQL?
Kind Regards,
Ian S. Vickerstaff