12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Storing Numeric Data■■NCHAR and NVARCHAR2 data types store variable-length Unicode character dataonly.CHAR and NCHAR data types store fixed-length character literals.5.2.2 Choosing Between the Character Data TypesWhen deciding which data type to use for a column that will store alphanumeric datain a table, consider the following points of distinction:■■■5.3 Storing Numeric DataSpace usageTo store data more efficiently, use the VARCHAR2 data type. The CHAR data typeblank-pads and stores trailing blanks up to a fixed column length for all columnvalues, whereas the VARCHAR2 data type does not add extra blanks.Comparison semanticsUse the CHAR data type when you require ANSI compatibility in comparisonsemantics (when trailing blanks are not important in string comparisons). Use theVARCHAR2 when trailing blanks are important in string comparisons.Future compatibilityThe CHAR and VARCHAR2 data types are fully supported.This topic contains the following topics:■■■What Are the Numeric Data Types?Using NUMBER Data TypesUsing Floating-Point Number Formats5.3.1 What Are the Numeric Data Types?The following <strong>SQL</strong> data types store numeric data:■■NUMBERSee Also:■■BINARY_FLOAT<strong>Oracle</strong> Database <strong>SQL</strong> Reference for information on data types<strong>Oracle</strong> Database Globalization Support Guide for information onglobalization supportSee Also: <strong>Oracle</strong> Database <strong>SQL</strong> Reference for more information oncomparison semantics for these data types■ BINARY_DOUBLEUse the NUMBER data type to store integers and real numbers in a fixed-point orfloating-point format. Numbers using this data type are guaranteed to be portableamong different <strong>Oracle</strong> Database platforms. For nearly all cases where you need tostore numeric data, you would use the NUMBER data type.<strong>Oracle</strong> Database provides the numeric BINARY_FLOAT and BINARY_DOUBLE datatypes exclusively for floating-point numbers. They support all of the basicfunctionality provided by the NUMBER data type. However, while NUMBER uses5-2 <strong>SQL</strong> <strong>Developer</strong> Online Help

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!