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:

# re: Oracle For SQL Server Developers, Vol. 3

Left by Anwar Mogal at 8/26/2010 3:29 PM
Gravatar
Really Cool stuff..
Please keep it coming!

Your comment:



 (will not be displayed)


 
 
 
Please add 5 and 1 and type the answer here:
 

Live Comment Preview:

 
«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789