I understand that in general it is a bad idea to use SELECT * in SQL. Are there any exception cases? Thanks!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you need every column, both current and future, taking into account that some may be added or removed.
Usually, this is the case only for tooling that needs database information totally, such as a schema lister, or if you’re doing analysis to try and find out where the information that you need actually resides.
It’s almost never needed for “real” applications, which should only know about, and ask for, what they need.
You don’t want your application falling in a screaming heap just because some other user of the database decided they needed forty-two 2GB BLOB columns added to each and every row 🙂