In today’s video, I have explained how quickly and efficiently with the help of the SQL Server Management Studio, we can replace the * by column names from the same table.
Now if you have more than one table, you will have to do the same process multiple times.
There are many reasons why people do not like SELECT * in their queries and here are just selected few reasons.
- Retrieves unnecessary columns and increases network traffic
- When new columns are added views needs to be refreshed manually
- Leads to the usage of a sub-optimal execution plan
- Uses clustered index in most of the cases instead of using optimal index
- It is difficult to debug
Please leave a comment with any other disadvantage if I have missed to list them. In most cases, it is not a good idea to use SELECT * in the query and we should replace star with column names.
If you like my videos, I request you to like, share, comment, and subscribe to these videos. Here is the link to my YouTube Videos.
Reference: Pinal Dave (https://blog.sqlauthority.com)