Oracle For SQL Server Developers, Vol. 3

Here's another post in the Oracle For SQL Server Developers series (vol1, vol2).  The goal with this post is to help you get a feel for some common column data types in Oracle.

Tip #16: Data Type Equivalents for Numbers

SQL Server Oracle
int NUMBER
float, real NUMBER(precision, scale)

In Oracle, a number can be a maximum of 38 digits.  Precision indicates the number of digits on the left of the decimal point.  Scale indicates the number of digits on the right of the decimal point.

A cool thing in Oracle is that the Scale can be negative.  So if you have a NUMBER(7, -2) column and you insert 9231234.83 the value that will get stored is 9231200.  (Hint: that zeroed out the tens and singles column.)

Tip #17: Date Equivalents

SQL Server Oracle
datetime DATE

Values can be from 1/1/4712 BC to 12/31/9999.  The standard format is DD-MON-YY and conversion can be done using the TO_DATE() function. 

Tip #18: Binary Data Column Equivalent

SQL Server Oracle
image BLOB

BLOB stores binary data (images, files, other raw data) and the maximum size is 128 terabytes.

 

Stay tuned.  There are at least 2 more posts coming in this Oracle For SQL Server Developers series!

-Ben

posted @ Thursday, October 23, 2008 5:05 PM

Print

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
 
Please add 3 and 3 and type the answer here:
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213