Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

We often see poorly asked questions relating to SQL that don't inspire us to help or answer because they are so poorly phrased and missing critical information. What do you look for in a good question about SQL that encourages you to spend your valuable time answering questions?

Instead of us rehashing time and again in each poorly phrased question why we might not help, we could point questioners to the answers below.

share|improve this question

migrated from Dec 7 '10 at 12:14

This question came from our site for professional and enthusiast programmers.

(1) This question belongs on meta, not the main stackoverflow site. (2) These concerns aren't specific to SQL: there are poor questions in almost every category. – LukeH Dec 7 '10 at 12:09
Oh err. I didn't know about the meta site. Thanks for moving the question. – Sir Wobin Dec 7 '10 at 13:04
Sorry couldn't avoid the obvious: a poorly placed question complaining about a poorly phrased question. – Toon Krijthe Dec 20 '10 at 11:50
Mea culpa. I didn't know about the meta site at the time. Consider me told off. – Sir Wobin Dec 20 '10 at 11:56

Including a simple script to reproduce the issue independent of their particular database would be extremely helpful - as would stating the flavour of SQL (i.e. DBMS), and clear intended results.

share|improve this answer
+1 for the flavour (yummy ;)) - people assume their flavour is The One True SQL (most common with the MSSQL and MySQL crowds), and then are surprised that their platform-specific solutions won't work with SQLite, Oracle or Postgres. – Piskvor Dec 20 '10 at 11:47

It would be helpful if all questioners:

  1. Describe what they're trying to achieve (i.e. the "why")

  2. Describe what they've tried so far (including any output or error messages)

  3. Describe what they expected to get (e.g. example query results)

I guess this is not specific to SQL...

share|improve this answer
  1. Describe your schema with some simple create table statements. Don't include columns that aren't relevant to the question.

  2. Tell us what you've seen in an explain plan. If you don't know what this means it's worth finding out more about your execution plans for your databases and how to interpret the explain plan command for your database.

share|improve this answer

You must log in to answer this question.

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