| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Problems with SELECT *
Hi all,
I was having a discussion with someone over his SQL snippet in a program:
SELECT * FROM emails
I do a lot of heavy database work and I hate seeing "SELECT *". As a general rule, when trying to write maintainable code, it's a good idea to be very specific about what you will allow. For example, consider the following SQL statement:
SELECT userid, email, contest FROM emails
That SQL statement has a variety of benefits:
I've now been asked where I can find an online article which details similar pitfalls (including the "select * from foo" example). I've had trouble finding anything and I was wondering if anyone could suggest some?
Cheers,
Ovid
Received on Wed Mar 12 2003 - 12:40:53 CST
![]() |
![]() |