Talk:SQL Dialects Reference

Moved the COALESCE function from String functions
...and into Misc. expressions, because COALESCE is not specific just to strings. It also works with date/time data types, exact numerics, approximate numerics, etc. The majority of DBMS's probably all follow the standard regarding CAST, COALESCE and NULLIF (which I moved all into the Misc. expressions category), but I'm not sure... so I'll leave it to someone else to add that information. The COALESCE function definitions in the misc. expressions page were taken from the string functions page. I imagine most platforms that implement COALESCE do so according to the standard, but since they weren't listed like that on the other page I've moved them over "as is". Please modify as appropriate.

Also, by definition, COALESCE and NULLIF are shorthand for equivalent searched CASE expressions. Any platform that does not have COALESCE but does have searched CASE expressions should have the equivalent searched CASE expression listed in place of COALESCE or NULLIF. E.g.:

COALESCE (val1, val2, val3)

Is equivalent to:

CASE WHEN val1 IS NOT NULL THEN val1 WHEN val2 IS NOT NULL THEN val2 WHEN val3 IS NOT NULL THEN val3 ELSE NULL END

...etc.SqlPac 17:38, 17 April 2007 (UTC)

SQL/XML Section
I added information about Microsoft's proprietary XML support (via the xml data type) in the SQL/XML section, along with footnotes describing them. For all of the SQL/XML functions specified, MSSQL was designated "n/a" in every area; but MSSQL 2005 does support almost all of the same functionality specified, but with proprietary extensions, such as the .query method of the xml data type. Please review and let me know if it would make more sense to break it out into its own section or leave it in the side-by-side comparison format you currently have. Thanks.SqlPac 17:06, 17 April 2007 (UTC)

Possible additions?
Two suggestions: In the "Data types" section, add a "Standard SQL" column that contains the data types as defined by the ISO/IEC standards, possibly including their aliases ("VARYING CHARACTER", etc.)  Also, add a section for Binary data types ("BINARY", "VARBINARY", "BIT", etc.)  If I can get a better handle on how to edit these tables without breaking the format, and there are no objections, I'll add these in. I only know the ANSI standard and MS SQL Server implementations specifically though, so someone else would need to fill in the blanks on Oracle, et al. Thanks.SqlPac 16:38, 17 April 2007 (UTC)

SQL/XML section
SQL/XML section: it's obvious that it was created by person who knows Oracle better than other DBMSs and standard papers (I mean only SQL/XML, no more). The list of functions is non-standard, DB2 and SQL Server are not covered properly. I'm going to rework this section taking latest drafts of ISO/ANSI 9075-14 as a basis. Also, it's worth to create additional section concerning "XML type" subsection in "Data types" (btw, "XML type", not "XMLType", the latter is oracloism :-) ) --Samokhvalov 18:11, 17 December 2006 (UTC)
 * Sure, feel free to do it, if you're better understand the subject. One thought: try to make every section a separate Wiki page. It will tremendously ease editing for us. --GreyCat 20:03, 17 December 2006 (UTC)