-15

Sometimes a question is marked as duplicate even though it isn't, where the different is subtle but very significant. Unfortunately such a question can quickly be flagged as duplicate and it's game over. Therefore there should be some mechanism to at least quickly explain why it's not a duplicate so that maybe additional moderators can un-mark it as duplicate.

Too many people quickly mark questions as duplicates without even fully reading them, or looking at the subtleties and there's no way to correct them.

For example my recent question was marked as duplicate even though it wasn't, and the duplicates given fall exactly into this category, where the subtlety is critical. I asked if it was possible to query all the databases for a specifically named table and the questions referred as duplicate all assumed you already knew the different databases which I didn't (explicitely stated in the question). This is subtle but the different is huge because I can't just name the databases manually and use joins or unions as suggested in the duplicates.

In other words the duplicates are invalid because they answer another question. Unfortunately because it has already been marked as duplicate it's game over. There should therefore be a mechanism to explain why it's not a duplicate and have it re-moderated after you explain why it's not a duplicate. And possibly even re-moderated by someone else because the first person most likely moderated it too quickly in the first place...

11
  • 1
    "Unfortunately because it has already been marked as duplicate it's game over." If your question wasn't a duplicate, then others can vote to reopen it. The place where you go to contest your question's duplicate status is here. Though you should be warned that doing so can lead to downvotes if people don't agree. Personally, I see your question as, "can the result of a select statement be used as part of a from clause?" I'm not an SQL expert, but I'd guess that the answer will be "no". Sep 25, 2017 at 2:43
  • 3
    Edit and vote to reopen? Sep 25, 2017 at 2:45
  • It's similar to that but more involved. Can the select be across multiple databases of unknown quantity. In other words the from is not just a select from that database but multiple databases. And I'm not trying to join/union them, but rather accumulate them in the same table under the same columns. That's the key difference Sep 25, 2017 at 2:48
  • @StephaneGrenier: Right, but my point is that your problem is that you want the result of a select statement to be used in a from clause. Your select is what finds all of the database names. The from clause is what uses those database names. That is the question you should be asking. Sep 25, 2017 at 2:54
  • @NicolBolas I agree however I don't know if it's possible to do this across different databases as compared to within the same database. That's the key. The only code I've seen be able to combine tables over different databases is through joins or unions which means it may not be possible through a select. If it was all within the same database I would completely agree with you. Sep 25, 2017 at 2:58
  • @NicolBolas What I'm trying to do is run the query over an unknown number of similar databases. As far as I know this is not possible without using an external language to combine the results. In other words there's no capability to do this over an unknown quantity of databases... Sep 25, 2017 at 3:07
  • @StephaneGrenier: But it's not an "unknown number." It's a very well-defined and well-known number. That number, and the set of databases, is simply governed by the results of a query operation. That doesn't mean it's "unknown". Sep 25, 2017 at 3:17
  • @NicolBolas I agree but if you look at the duplicates (he specifically points to the second answer) it seems to only show it's possible using a UNION and not feed result into your query because it's using different databases. The answer he specifically links in the comments creates some huge procedure that drops tables, etc. In other words it's not as simple as you think because it's across multiple databases. Yes what you're saying is true within the same database but not necessarily across multiple databases. That's the subtle but huge difference ;) Sep 25, 2017 at 3:24
  • @NicolBolas In other words I don't believe you can just feed a result into another query if it's a meta result over many databases. This is a special case. Sep 25, 2017 at 3:35
  • @NicolBolas I'm not trying to do as your suggesting: "SELECT * FROM myTable WHERE myTable.id = (SELECT id FROM anotherTable WHERE someOtherCondition)" What I'm trying to do is something like: "SELECT * FROM [databaseList].myTable WHERE myTable.id = 1". In other words I want to get all the rows from myTable in all the database where ID=1. Sep 25, 2017 at 3:40
  • 2
    The feature you describe already exists. You edit your question, and this put it into a review queue where community members determine whether it should be re-opened, based on your clarifying edit. Sep 25, 2017 at 4:52

1 Answer 1

1

There should therefore be a mechanism to explain why it's not a duplicate and have it re-moderated after you explain why it's not a duplicate.

You're actually on it; on Meta. We discuss s all the time here. So, from here I'm going to treat this question like a request to reopen the question.

Your rationale here seems sound, and seems like something you should edit into the question:

I asked if it was possible to query all the databases for a specifically named table and the questions referred as duplicate all assumed you already knew the different databases which I didn't (explicitely stated in the question). This is subtle but the different is huge because I can't just name the databases manually and use joins or unions as suggested in the duplicates.

I don't know much about MySQL anymore, since I haven't worked with it in over five years, but I'm seeing that the dupes aren't entirely answering your question. Edit it with the clarifying statement above (and wordsmith it a bit better), and it will make its way through the review queues for others to review and determine if it's really not a dupe.

3
  • I hate to say this but using meta is really not an obvious way to discuss a specific question :( I had no idea at all. There are no indication of this anywhere. Maybe a pointer to this fact could be added near the duplication flag? Sep 25, 2017 at 3:25
  • I agree however if you look at the first SQL query it's a select to get the list of tables and databases ;) I also start by saying I'm querying the list of databases and linking to another SO question. I understand what you're saying but I believe the issue is that people assume you can feed any result into another query. The key is that this may not be true over different databases, not to mention it's a meta data query. The discussion above is having this same issue. The key is feeding the result of a query over multiple databases. People assume you can like an ordinary query. Sep 25, 2017 at 3:33
  • As per your suggestion I added some further clarification to the SO question. Sep 25, 2017 at 3:44

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