4

When asking a Microsoft SQL Server SQL code question I usually tag them (the language) and (the implementation).

On the other hand there is also a very frequently used tag (for the language dialect).

Using all three tags in the same question seems overkill to me.

What is the proper usage of the tag?

1
  • Somewhere I read that we don't want to burninate the more-general cases. I'd rather leave all these in, just for convenience sake. Although yea it's a headache Commented Jan 24, 2015 at 19:28

1 Answer 1

5

You use if you're using SQL.
You use if you're using the proprietary extension to SQL.
You use if you're using SQL Server.

These tags can be mutually exclusive, so please add all of them if necessary.

SQL is a language implemented (differently) by multiple database management systems. If you're using this tag you should also be tagging your question with the name of the RDBMS, Firebird, SQL Server, MySQL, PostgreSQL, Oracle, Sybase etc... Or, if you're following the standard there's the tag.

T-SQL is a proprietary extension to SQL implemented by both SQL Server and Sybase. If you're using T-SQL you should be adding this tag, but not if you're using standard SQL. Because T-SQL is implemented by two RDBMS' it does not imply SQL Server. T-SQL also does not imply SQL. If you're using procedural T-SQL you may not be using SQL (you can embed SQL in T-SQL so you might).

SQL Server is a RDBMS. If you're using SQL Server then use this tag. However, your question does not necessarily have to be related to SQL or T-SQL. If you're asking a design question specific to SQL Server or if you're asking about more administration related things (they might be off-topic) then you're probably not using SQL or T-SQL. As a side note, if you've got a problem with a specific version of SQL Server please use the appropriate tag for that version, i.e. .

In short, know what technologies and languages you're using and tag your question appropriately to ensure the most eyes on the question in the beginning and the most accuracy for all those who have the same question.

To your specific case, if you're asking a SQL question about SQL Server tag your question and . If you're also asking about the extensions to SQL defined in T-SQL, in which case also tag your question . If you're question is version specific, also tag your question with that version.

This applies equally to all relational databases and procedural extensions; Oracle and PL/SQL; PostgreSQL and PL/pgSQL; DB2 and SQL PL etc.

11
  • so complicated...
    – Braiam
    Commented Jan 25, 2015 at 2:30
  • This means that up to 4 tags can be used up by just specifying the "technology" and that then only leaves 1 tag to be used for other classifications. Commented Jan 25, 2015 at 14:06
  • No, this means that up to 4 tags can be used in specifying the language(s) and the technology @Jens. This isn't unusual. It's also rare that you'll have version specific questions, or issues embedding SQL in T-SQL, so it's more likely you'll only have 2 tags.
    – Ben
    Commented Jan 25, 2015 at 15:09
  • So once you use at least one non-ANSI-SQL feature you don't tag the question sql, but t-sql instead? Wouldn't this mean that otherwise you would tag the question ansi-sql and drop the sql tag? In that case the sql tag would be completely superflous. Commented Jan 25, 2015 at 15:53
  • Easier put: You always use a specific SQL dialect (T-SQL, ANSI-SQL, MySQL, etc.), so what is the usefulnes of the sql tag? Commented Jan 25, 2015 at 15:56
  • So that people can find your question to answer and so that others who have the same question can find those answers in the future. If you ignore the ANSI-SQL tag, which is hardly ever used and assume that only SQL exists, does that make it easier? I'm not saying that if you're using at least one feature then drop SQL; I said if you're using procedural T-SQL then there may not be a need.
    – Ben
    Commented Jan 25, 2015 at 16:00
  • IOW: You would always use SQL-Server and SQL and add the T-SQL tag only when the question is specifically about the procedural extensions? I think that works for me. Commented Jan 25, 2015 at 16:31
  • The sql tag currently says If your question relates to a specific DBMS (uses specific extensions/features), use that DBMS's tag instead. However, the "Tagging Recommendation" further down says the exact opposite: This tag should be used for general SQL programming language questions, in addition to tags for specific products. I'm confused. Commented Jan 17, 2018 at 17:31
  • I've added a single word "solely" to the recommendation @William. Does that clear up the confusion?
    – Ben
    Commented Jan 17, 2018 at 18:55
  • I should add that the point of the tagging system is finding relevant information, which is why a heterarchy works. If you're using SQL you want the right answerers to find your question and the site wants potential new askers to find it too so that they don't ask the same question again. Therefore, using sql is the best outcome for everyone, if it's relevant.
    – Ben
    Commented Jan 17, 2018 at 18:58
  • I suspect every non-trivial SQL question has a vendor-specific answer whether the questioner is asking for one or not, even if a generic answer is also possible. As an answerer, I need to know whether I'm wasting my time putting together a demo using an Oracle feature, for example, if it's going to turn out that the OP isn't using Oracle, or a less efficient generic solution if they are. This is why in practice most people tag the vendor in addition to sql, as per the tagging recommendation, rather than just the vendor as instructed in the description, and get told off if they don't. Commented Jan 18, 2018 at 15:14

You must log in to answer this question.

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