Twenty years ago, I had zero programming experience. Today, I'm a data architect who watched countless technologies rise and fall while SQL remained unshakeable. From converting COBOL programs to solving critical performance crises, SQL became my career passport through developer, analyst, engineer, and architect role
Understanding COUNT(*) vs COUNT(1) in SQL
COUNT(*) and COUNT(1) serve to count rows in SQL, yielding the same results but with nuanced internal processing. Modern SQL engines treat both functions similarly, resulting in negligible performance differences. COUNT(*) is preferred for clarity, while COUNT(1) is used out of habit. COUNT(column_name) counts non-NULL values in a specific column.