0

I only have MySQL installed right now but will these work fine when run in PgSQL, MS SQL, etc.?

SELECT MAX(field) as max_field FROM table
SELECT MIN(field) as max_field FROM table
SELECT SUM(field) as max_field FROM table
LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
IMB
  • 15,163
  • 19
  • 82
  • 140

3 Answers3

1

You could check for yourself, but aggregate functions are common across most, if not all, RDBMS:

You get the idea.

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
1

Yes, they work well in every database.

SELECT AVG(field) as max_field FROM table -- Work fine too
FabianoLothor
  • 2,752
  • 4
  • 25
  • 39
0

All *SQL RDBMSes are designed to be used with the SQL language. ALL of them. That's why they're called *SQL RDBMSes. Aggregate functions are part of standard SQL, and therefore usable wherever SQL is usable.

Palladium
  • 3,723
  • 4
  • 15
  • 19
  • 1
    I believe the question was whether the aggregate functions were part of standard sql or were vendor specific – Ghost Jul 26 '12 at 17:26