Java Reference
In-Depth Information
 
ANSI/ISO/IEC 9075-1-1999 Information Technology - Database Language - SQL Part 1:
Framework (SQL/Framework)
 
ANSI/ISO/IEC 9075-2-1999 Information Technology - Database languages - SQL - Part 2:
Foundation (SQL/Foundation)
 
ANSI/ISO/IEC 9075-3-1999 Information Technology - Database Languages - SQL - Part 3:
Call-level Interface (SQL/CLI)
 
ANSI/ISO/IEC 9075-4-1999 Information Technology - Database languages - SQL - Part 4:
Persistent Stored Modules (SQL/PSM)
 
ANSI/ISO/IEC 9075-5-1999 Information Technology - Database Languages - SQL - Part 5: Host
Language Bindings (SQL/Bindings)
One of the difficulties you encounter when working with SQL is that each provider
uses a slightly different dialect of the language. In the main, these differences amount
to enhancements, in that they add to the functionality of SQL. However, they do mean
that your SQL statements may not be entirely portable from one implementation to
another.
Chapters 5 through 10 provide detailed examples of the use of
SQL in the context of the Java Database Connectivity (JDBC)
Core API. Appendix A provides a guide to common SQL
commands.
Cross-Reference
SQL Data Types
SQL supports a variety of different data types that are listed in Table 3-1 , together
with JDBC data types to which they are mapped. It is important to realize that
different SQL dialects support these data types in different ways, so you should read
your documentation regarding maximum string lengths, or numeric values, and which
data type to use for large-object storage.
Table 3-1: Standard SQL Data Types with Their Java Equivalents
SQL type
Java Type
Description
BINARY
byte[]
Byte array. Used for binary large objects.
BIT
boolean
Boolean 0 / 1 value
CHAR
String
Fixed-length character string. For a CHAR
type of length n, the DBMS invariably
assignd n characters of storage, padding
unused space.
DATETIME
java.sql.Date
Date and Time as: yyyy-mm-dd hh:mm:ss
DECIMAL
java.math.BigDecimal
Arbitrary-precision signed decimal numbers.
These can be retrieved using either
BigDecimal or String.
 
Search WWH ::




Custom Search