apache.org > db > ddlutils |
SQL Server
The SQL Server is supported form version 6.5 onwards. Information about the versions prior to SQL Server 2000 however is difficult to find online, you'll have to resort to the documentation accompanying the database. Information for version 2000 can be found here.
If possible, you should use the newest driver available. The older JDBC drivers (for SQL Server 2000 and older) provided my Microsoft, are known to be buggy and slow. The new SQL Server 2005 driver is preferred and can also work with SQL Server 2000.
Platform identifier:
- MsSql
Recognized JDBC drivers:
- com.microsoft.jdbc.sqlserver.SQLServerDriver
- com.microsoft.sqlserver.jdbc.SQLServerDriver
Recognized JDBC sub protocols:
- jdbc:microsoft:sqlserver
- jdbc:sqlserver
- jdbc:sqljdbc
The database supports SQL comments | yes |
The database supports delimited identifiers | yes |
The database's maximum identifier length | 128 |
The database supports default values for LONG types | yes |
DdlUtils uses sequences for identity columns | yes |
The database supports non-primary key columns as identity columns | yes |
The database allows INSERT/UPDATE statements to set values for identity columns | yes |
DdlUtils can read back the auto-generated value of an identity column | yes |
The database supports non-unique indices | yes |
DdlUtils can create a database via JDBC | no |
DdlUtils can drop a database via JDBC | no |
JDBC Type | Database Type | Additional comments |
---|---|---|
ARRAY | IMAGE | Will be read back as LONGVARBINARY |
BIGINT | DECIMAL(19,0) | A native BIGINT type is supported only since SQL Server 2000 |
BINARY | BINARY | |
BIT | BIT | |
BLOB | IMAGE | Will be read back as LONGVARBINARY |
BOOLEAN | BIT | Will be read back as BIT |
CHAR | CHAR | |
CLOB | TEXT | Will be read back as LONGVARCHAR |
DATALINK | IMAGE | Will be read back as LONGVARBINARY |
DATE | DATETIME | Will be read back as TIMESTAMP |
DECIMAL | DECIMAL | |
DISTINCT | IMAGE | Will be read back as LONGVARBINARY |
DOUBLE | FLOAT | Will be read back as FLOAT |
FLOAT | FLOAT | |
INTEGER | INT | |
JAVA_OBJECT | IMAGE | Will be read back as LONGVARBINARY |
LONGVARBINARY | IMAGE | |
LONGVARCHAR | TEXT | |
NULL | IMAGE | Will be read back as LONGVARBINARY |
NUMERIC | NUMERIC | |
OTHER | IMAGE | Will be read back as LONGVARBINARY |
REAL | REAL | |
REF | IMAGE | Will be read back as LONGVARBINARY |
SMALLINT | SMALLINT | |
STRUCT | IMAGE | Will be read back as LONGVARBINARY |
TIME | DATETIME | Will be read back as TIMESTAMP |
TIMESTAMP | DATETIME | The native TIMESTAMP type of SQL Server serves a different purpose: it provides a counter that automatically increments upon each insertion or update of the table. |
TINYINT | SMALLINT | The native TINYINT type only supports values between 0 and 255. Will be read back as SMALLINT |
VARBINARY | VARBINARY | |
VARCHAR | VARCHAR |