Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

We knowWe know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending that MySQL and its treatment of GROUP BY don't exist

We know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending that MySQL and its treatment of GROUP BY don't exist

We know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending that MySQL and its treatment of GROUP BY don't exist

deleted 1 characters in body
Source Link

We know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending thethat MySQL and its treatment of GROUP BY doesn'tdon't exist

We know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending the MySQL and its treatment of GROUP BY doesn't exist

We know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending that MySQL and its treatment of GROUP BY don't exist

Are some Bad Practicesbad practices within answers acceptable? Specifically SELECT *

We know that in production code with SELECT * is bad.

However, I often will often write SELECT * this in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered inwith the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with*with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *

Obviously. Obviously, I think itsit is acceptable to answer with SELECT * but I can't say why.

*[A] I'm pretending the MySQL and its treatment of GROUP BY doesn't exist

Are some Bad Practices within answers acceptable? Specifically SELECT *

We know that in production code with SELECT * is bad.

However I often will write SELECT * this in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered in the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with*.

Recently someone thought an answer of mine would be improved if I removed the SELECT *

Obviously I think its acceptable to answer with SELECT * but I can't say why.

* I'm pretending the MySQL and its treatment of GROUP BY doesn't exist

Are some bad practices within answers acceptable? Specifically SELECT *

We know that in production code SELECT * is bad.

However, I will often write SELECT * in my SQL answers when

  • The OP failed to include their SQL (so I've got nothing to copy and paste)
  • The OP's question is really answered with the JOIN or WHERE
  • There's no syntax in my answer like GROUP BY that SELECT * can easily conflict with. [A]

Recently someone thought an answer of mine would be improved if I removed the SELECT *. Obviously, I think it is acceptable to answer with SELECT * but I can't say why.

[A] I'm pretending the MySQL and its treatment of GROUP BY doesn't exist

Source Link
Loading