SQL programming / SQL portability |
SELECT a, b, sum(c) FROM table GROUP BY 1,2
This is not possible with all database servers:
Database Server Type | GROUP BY colindex, ... ? |
---|---|
IBM® DB2® UDB | No |
IBM Informix® (1) | Yes |
Microsoft™ SQL Server (2) | No |
MySQL | Yes |
Oracle Database Server | No |
PostgreSQL | Yes |
Sybase ASE | No |
SQLite | Yes |
Search for GROUP BY in your SQL statements and use explicit column names.