Determine flavor of SQL being used

Viewed 431

I have a mysterious SQL database presented through a web interface. I tried to show tables; but was told that's not a valid command, so I'm trying to figure out what flavor of SQL this is.

Does anyone know a command that can help identify the flavor of SQL being used? Any pointers would be very helpful!

1 Answers

Not an answer but a comment that doesn't fit in the comments. You can start by trying the following commands and see if one succeeds:

  • Oracle: select * from V$VERSION;
  • DB2: select service_level from sysibmadm.env_inst_info;
  • PostgreSQL: select version();
  • SQL Server: select @@version;
  • MariaDB: select version();
  • MySQL: select version();
  • H2: SELECT H2VERSION() FROM DUAL
  • SQLite: select sqlite_version();
  • Firebird: select rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database;

HyperSQL gives itself away by implementing the BOOLEAN and INTERVAL types.

In Derby you can select from the table sysibm.sysdummy1 (as well as in DB2).

Related