Search code examples
sqlsql-server-2005oracle11gpivotansi-sql

Is there an ANSI Specification for the PIVOT statement?


Lately I asked the question How can I use PIVOT to show simultaneous average and count in its cells?

The question is answered for SQL-Server (2005+) and Oracle (11g +)

Obviously the sql-server implementation is rather limited and Oracle implementation yields strange column names.

Are these independent solutions or are there based on some ANSI-standards?


Solution

  • It isn't in ANSI-92.

    The later versions are not freely available (as far as I can tell) except a draft SQL:2003. Also not mentioned

    Note: neither pivot nor cross-tab are mentioned