21

I answered a question a few days ago in which a user was requesting a way to store multiple variables on a single field in MySQL (no code, no examples just a way to store multiple variables in a single field). My response was the new JSON type available in MySQL version 5.7.8. One user commented that this response was not an answer, but that was a comment.

Another user responded with a totally different way explaining that this was not a way to store information in MySQL and that they should create more tables etc. (which is true, but it was not what the user requested).

My questions:

  1. How should I answer this type of question?
  2. How I can determine that it should be a comment instead of an answer?
13
  • 68
    Short answers are still answers. Commented Jul 19, 2019 at 12:45
  • 4
    2 users commented that was not an answer, I got up 1 up vote and suddenly they deleted the question. So I just want to know what other users think and try to figure out why the posted that "this is suppose to be a comment".
    – Vidal
    Commented Jul 19, 2019 at 12:48
  • Can you add the exact text of your answer? Or a link to the question? If something is a comment or an answer is a case-by-case decision.
    – BDL
    Commented Jul 19, 2019 at 12:50
  • it was deleted, that's why I am posting here.
    – Vidal
    Commented Jul 19, 2019 at 12:52
  • Isn't the question and your answer on Storing multiple dynamic values within one field in mysql ?
    – Tensibai
    Commented Jul 19, 2019 at 12:52
  • 3
    Tensibai & dWinder no, the question was marked as duplicate to that question, I readed it and t was 9 years old. So basically I answer the same thing and gave an example of 2 sql queries on how to use it. I did it because people may land in that page and now we have the JSON type that we did not have 9 years ago.
    – Vidal
    Commented Jul 19, 2019 at 12:56
  • So I can't tell for the original, on this new one, it's asking about php, transforming objects to json to save in base and reconverting them after is no more/no less an hassle than the serialize pattern from php before, so it's worthy of being shared. I do think a small example of how you would do that in php would be better for the question linked above, as the mysql side itself doesn't completely answer the question
    – Tensibai
    Commented Jul 19, 2019 at 13:07
  • See meta.stackoverflow.com/a/266955/3182664
    – Marco13
    Commented Jul 19, 2019 at 20:16
  • Very related, if not a duplicate: Is “very short answer” an answer or comment?
    – Davy M
    Commented Jul 19, 2019 at 20:17
  • 1
    What ultimately matters is the usefulness. If it's useful - short or long - you will find out by the way of the voters. But throwing a piece of code down without explanation is generally not considered useful. It may be to the OP, but it likely won't to the other hundreds or thousands of other people who are looking for a similar solution. Commented Jul 19, 2019 at 22:21
  • 2
    The person telling you to post your answer (however short) as a comment was wrong. I cannot stress that enough. Commented Jul 20, 2019 at 14:58
  • Helping to answer, but not actually answering, is not an answer, is it?
    – Raedwald
    Commented Jul 22, 2019 at 7:54
  • @Raedwald, where did you get that he did not actually answer it? My reading of it suggests he did. Or are you working on the basis that answering a question is not helping to answer it as the title indicates? I'd suggest editing the title to change "helps solve" to "solves" if you think it is likely to cause confusion, but personal I think it is quite understandable unless I'm missing something you picked up on? Commented Jul 22, 2019 at 13:33

5 Answers 5

24

Regarding your specific case: having this question may be little bit too broad as the user hasn't posted any code or tried anything by himself.

If you decide to answer this, you should try to elaborate as much as you can so it will be clear for future users. Adding a link to the formal document is a good move and you should also add a simple example of how to use it.

So I think you did well in your case.

Generally speaking,

As said in the comment, a short answer is an answer all the same. I do believe that answer should have a simple example (which cannot be put on comment) and quote + a link to formal documentation which establishes it as a good answer which probably won't be flag/confused as a comment

3
  • 2
    Yes I did post the link to the official reference from mysql, I almost always do it if I reference some function method etc. I believe not only on giving the answer if not giving them where the documentation is so they can also learn all the capabilities of the functions etc.
    – Vidal
    Commented Jul 19, 2019 at 13:05
  • 3
    I'll add that adding an answer to old questions when a new technology allow a new method is generally well received when properly answering the question.
    – Tensibai
    Commented Jul 19, 2019 at 13:10
  • 1
    I have to admit that a question I don't think will be view a lot (dup/poorly phrased, simple) I sometimes just comment the solution - I am not saying its the best practice here but it happens to me as well. If I decide to post formal answer I always add link and example - so I do think answer can be short but in my opinion, most of the times, it make them less helpful
    – dWinder
    Commented Jul 22, 2019 at 13:52
3

The length of an answer is at most a hint. As Andre Kool wrote in the first comment: short answers are also answers. I actually prefer succinct answers as long as they contain all the essential information because they save time reading.

But how do you know if an answer (short or long) really is an answer? The question is if the specific problem is really solved or sufficient help is given so that one can solve it. If it's only s partial solution or overly vague, it's rather a comment.

Short answers containing less explanations than longer answers might be seen as less useful and might earn less upvotes.

One way to answer such questions is by writing: "One way to store multiple variables in a single MYSQL field is ..." That should be a valid answer and it leaves the estimation of the usefulness to the reader/voter.

3

An answer doesn't become a comment just because it's short. For instance, in answer to questions like "Is it possible to X", an answer might be "No."

To make an answer useful though, adding a bit of context often helps. In your case, in addition to naming the type that would be useful, add a sentence or two covering how it could be used, when the type was introduced, and why you think it's better than alternative solutions.

2

A succinct answer can often before more helpful than an essay - because it's quicker to read and understand. In the case of most simple questions, a quick code example and a link to relevant documentation for extra information is a complete and thorough answer.

By contrast, a more complicated question may require that sort of extra unpacking - so an answer being "long" isn't conclusive either.

I do not think the length of an answer is in any way representative of its quality, as it's entirely dependant on the question and the amount of detail it demands. If it was, then short answers would already be disallowed in the validation stage.

-2

I really do not like the answers that are pushing a significantly different solution, instead of telling how to do what has been asked. It may be appropriate to say "do you know what are you doing?", but this should definitely be in a comment. Too often this is just a rant over preferred technology.

Hence I think your answer is an answer and that another should be a comment.

You must log in to answer this question.

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