diff --git a/jOOQ/src/main/java/org/jooq/impl/MetaImpl.java b/jOOQ/src/main/java/org/jooq/impl/MetaImpl.java index aecad911b6..ca7e2cd421 100644 --- a/jOOQ/src/main/java/org/jooq/impl/MetaImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/MetaImpl.java @@ -854,8 +854,13 @@ final class MetaImpl extends AbstractMeta { type = DefaultDataType.getDataType(family(), typeName, precision, scale); // JDBC doesn't distinguish between precision and length - type = type.precision(precision, scale); - type = type.length(precision); + if (type.hasPrecision() && type.hasScale()) + type = type.precision(precision, scale); + else if (type.hasPrecision()) + type = type.precision(precision); + else if (type.hasLength()) + type = type.length(precision); + type = type.identity(isAutoIncrement); if (nullable == DatabaseMetaData.columnNoNulls)