Equivalent of DB2's smallint data type
When migrating a database from DB2 to Oracle, what is the equivalent of the 'smallint' data type (of DB2) in Oracle?
Well, check in the DB2 reference how many bytes is smallint in capacity. I know in SQL Server, it is 2 bytes. 2 bytes represents a number from -2^16 to 2^16 That means 65536. The numeric Oracle equivalent is Number(5). In general, the algorithm is to see how many bytes in source DBMS, lets say N, then compute how many digits in 2^N AND define number with same amount of digits.
For More Information
- What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle DBA jobs, training and certification
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our Oracle Database / Applications experts
View all Oracle Database / Applications questions and answers
Start the conversation
0 comments