When * is used in a select query, it returns all the columns in a table. This approach can be used in a development or testing environment, but it should not be used in the production code.
The main reason it should not be used is that the structure of the table the statement references may change over time and when this happens, there is potential for breaking the code that worked before the table was modified.
Let’s take an example. Suppose Movie table has MovieName, Year, and Review columns:
SELECT * from Movie
Should be replaced by:
SELECT MovieName, Year, Review
Specifying the column names also makes code maintenance easier. Another person will not have to guess what the statement returns.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
Related Posts
- Mashape Releases Kong API Management Platform Under an Open-Source License
- Create High Performance Parallel Processing Jobs Using Azure Batch Services
- Serialize an Object to a JSON String
- Austin highway expansion threatens local businesses
- Excel Pivot Table ??? Replace blank values with a predefined text
























