Вопрос

The java.sql Javadoc defines SQL types in the java.sql.Types class. However, I can't find definitive information describing which type is implemented by which major database player (for me, this means: MySQL, MSSQL, H2, PostGre, Oracle)?

The ultimate information I am looking for is the subset of these types implemented by ALL major database players (as defined above). I want to be able to write portable SQL statements using these types only. I don't want to use ORMs.

Is such information already available somewhere? Thanks.

Это было полезно?

Решение

This table from Wikipedia contains a summary of data types implemented by different database vendors.

Good luck. You've go a hard job ahead of you.


I've had difficulty finding existing general solutions to this problem, apart from ORMs and the like. My conclusion is that most people who want database independence use an ORM these days.

However, you might want to take a look at the SwiSQL API. (Its a commercial product, and the set of supported databases looks a bit dated. But hey, it could work for you ...)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top