I always hear from SQL specialists that it is not efficient to use the '*' sign in SELECT statement and it is better to list all the field names instead.
But I don't find it efficient for me personally when it comes to adding new fields to a table and then updating all the stored procedures accordingly.
So what are the pros and cons in using '*' ?
Thanks.
In general, the use of SELECT *
is not a good idea.
Pros:
SELECT *
Cons:
VARBINARY
column that contains 200k per row. You only need this data in one place for a single record - using SELECT *
you can end up returning 2MB per 10 rows that you don't need
SELECT *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With