Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

determine database type?

Status
Not open for further replies.

robdunfey

Technical User
Apr 26, 2002
110
0
0
GB
Hi,

I cant find out what database I am connected to. Is it possible to determine the difference between Oracle, DB2, SQLServer and Access if the only thing you know about the database is if it supports anyone of the following 5 SQL clauses?

Distinct
All
As
Order By
Group By

I suspect not, but if so that would be very convenient.

Kind Regards,

ROB

PS: As Oracle users, I hope this isn't too off topic.
 
Since those are all standard SQL reserved words, they are probably supported by all three.

You might try some RDBMS-specific queries to get a better feel. For instance, rowid and sysdate might be Oracle-specific, as well as the table user_users. So you could try something like:

SELECT rowid, sysdate FROM user_users;

If you get an error saying there's no such table or no such column as rowid or sysdate, it's not an Oracle database. If
 
Don't you get a login banner saying what it is you're connecting to? If not, as carp says, there must be hundreds of differing ways to do things in each type - try a Google search for differences between each. HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top