Asked a question in

What are the pros and cons of using `select table_name.*`?

I was thinking about asking this as soon as it happened but I was reading/replying to comments and answers. A user edited the title of the question.

My title:

Is it lazy or bad form to use select table_name.*?

Edited title:

What are the pros and cons of using `select table_name.*`?

I just liked my title better. Is it bad form to immediately change it back to it's original. I'm still kind of new here.

Sub question: Should I be more clear about what I am asking? Is it ambiguous that I might be asking "Which title is better?" when what I want to know is "Should I have changed the title back? Why or why not?" - feel free to edit my title if you think so.


Your question wasn't really a question, more of an invitation for debate and opinion (which is why it was closed). The edited title simply reflects that fact more plainly than your title did.

To answer your question about title rollback, it's not really "bad form" to roll back edits if you feel that those edits don't improve or clarify the question. There have been a few times where an edit changes the intent of the question or distracts from the real question being asked, but usually when that happens it's an indication that you need to revise the question yourself.

  • I tried to be clear in my question that I did not want to solicit much opinion. I can understand that a question like mine definitely can but it was not my intention. I was looking for examples of good use that I could match my own code to. I expected some discussion of course. – Matthew Feb 1 '12 at 19:40
  • 3
    @Matthew: Of course, though keep in mind that saying "Which is better, X or Z? Please be objective." doesn't change the fact that it's an argumentative question. As indicated in the comments to your question, the better title would have been "Are there legitimate uses for select *?" The beauty of SE is that the more you use it, the easier it gets to write high-quality questions and answers :) – Justin ᚅᚔᚈᚄᚒᚔ Feb 1 '12 at 19:46
  • I'm thinking now that maybe I could have come up with a better title. Though what I might ask is (not @Justin but just in general) Why naysayers of select table_name.* couldn't just add an answer as to why not and let it be upvoted/downvoted - I might have preferred it that way for my question - is it wrong for me to want that? – Matthew Feb 1 '12 at 19:59
  • No, not wrong to want. It's just that SO isn't the site for that kind of discussion -- that's what forums, blogs and reddit are for. SO is for practical, answerable problems that are unique to the programming profession. – Justin ᚅᚔᚈᚄᚒᚔ Feb 1 '12 at 21:41
  • 1
    @Matthew The problem is "naysayers of select *" are making blanket judgements and there is no basis to their argument. If there was no place for select * it wouldn't be in the language. You should be asking about appropriate/inappropriate usage situations (see my answer). – pseudocoder Feb 1 '12 at 22:29

It is your title, so if you think your version is better, go for it. Of course it's always good to take notice of the reason why a post is edited and wait a few minutes to let it sink in. If you decide to re-edit, make sure you give clear explanation as to why you did it.

Personally, I wouldn't mind if someone cancelled my edits. Take it or leave it.


I don't think the title was the problem with your question. The problem is it was too open-ended and didn't invite a definite answer. It's interesting to me that the suggested duplicate ( select * vs select column ) was almost exactly the same question but got an almost purely performance-oriented answer. OTOH, your question got a very code-maintenance oriented answer.

If you were looking for the type of answer you got, you might have asked "Under what circumstances can using SELECT table_name.* result in fragile code?" The other question might have been more precisely stated as "What are the performance implications of using SELECT table_name.* over SELECT table_name.column_name?"

  • 2
    Also note the other suggested duplicate: I think it is closer to Matthew's original question. – dasblinkenlight Feb 1 '12 at 22:34
  • The way that a question is worded can mean different things to different people and illicit different responses. I may be a bit off base in saying that since, yes, they are the same question because they will get the same information back as answers. I tried to be precise about my situation but ultimately it got closed anyway. I can accept that but I would have rather had more (quantity) concrete answers themed around what I was asking. – Matthew Feb 1 '12 at 22:37
  • Another point I could make is that the debate on select * has already been done and the general answer is that it is bad... except sometimes. There may be a lot of reason's why it is useful so I wanted to discuss those instead of why it is bad. I guess I'm glad it was closed if it was deemed too unconstructive. Anyway, I'm not debating it's closing so that's all I want to say about that. – Matthew Feb 1 '12 at 22:52
  • 1
    @Matthew You stated the problem in your last comment: You "wanted to discuss". Q&A is not discussion. Your "question" is not a question, it's an invitation to discuss, and only that. If you want suggestions for best practices it needs to be within the context of a specific example you actually need help on. – pseudocoder Feb 2 '12 at 0:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .