17

TL;DR:


The tags and are both about CASE in SQL. states that the tag should not be about programming language Case [statement] questions and should be used instead. , on the other hand, confusingly states "Do not use this tag, use [switch-statement] instead." even though it also explicitly says it's about the SQL CASE: "A case statement allows sequences of SQL statements..."

I propose that should be merged into . The former only has 431 questions, where as the latter 7,869. , as a name, is also incorrect, as CASE in SQL is not a statement but an expression; it doesn't control the logical flow of the SQL statement but returns a scalar value. Calling it a "statement" implies it works like a programming language Case (Switch) statement, which it functionally does not.

I would also suggest that should then be made a synonym of , not to avoid the aforementioned confusion.

Ideally I would also, personally, suggest that should be a synonym of , rather than the other way round (to again try to avoid the aforementioned confusion) but that's more semantics.

9
  • 4
    Case is a bad tag and should not exist. People are using it for non-sql questions.
    – Braiam
    Sep 17, 2021 at 18:45
  • 3
    People misuse tags all the time, @Braiam , and it's why I'm proposing that it should be [case-expression] not [case].
    – Thom A
    Sep 17, 2021 at 19:27
  • Sorry, I read it backwards, that case should stay.
    – Braiam
    Sep 17, 2021 at 19:28
  • 7
    Retag [case-statement] as a synonym of [switch-statement], just in [case].
    – kjhughes
    Sep 17, 2021 at 19:33
  • That's in there too, @kjhughes ;)
    – Thom A
    Sep 17, 2021 at 20:03
  • Yes, I support your proposal. That comment was meant to be a title suggestion.
    – kjhughes
    Sep 17, 2021 at 20:32
  • SQL/PSM (i.e. the ISO/ANSI SQL stored procedures) has a case statement - which I wouldn't tag as switch-statement.
    – jarlh
    Sep 18, 2021 at 19:46
  • 3
    How about [sql-case] for the SQL related questions? It matches [sql-update], [sql-like], [sql-order-by], etc. Sep 19, 2021 at 2:00
  • Case does not means Case when used inapporpriately.
    – PCM
    Sep 19, 2021 at 16:36

1 Answer 1

1

There is clearly no need for the separate tags about switch and case where these relate to the switch/case construct in imperative languages. In my opinion, any tags about this construct should be merged into a single tag, perhaps (currently a synonym of ) is the best option since it will show up when you enter either switch or case into the tag list. This would also be consistent with how the tag is named.

I didn't look very far, but it looks like quite a significant number of questions are using the tag for questions about the SQL CASE construct, and the tag wiki does specify that that is what the tag should be used for. So I propose cleaning up that tag to remove any questions not about SQL (and retagging them where appropriate), and renaming that tag to in order to prevent further misuse.

You must log in to answer this question.

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