C H A P T E R  6

Image

Type Conversion

Type conversion takes place in almost every PL/SQL program. It is important to know how to convert from one datatype to another so that your applications can contain more versatility. Not only are datatype conversions important to developers, but they can also be a godsend to database administrators. Type conversion can occur when moving data around from one table to another. It is also very common when obtaining data from input forms and performing calculations upon it.

Whatever your use may be, this chapter will get you headed into the right direction with a handful of useful recipes. If your application works with dates or numbers, you will most likely find this chapter useful. There are two forms of datatype conversion: explicit conversion and implicit conversion. Explicit datatype conversion is what you will learn about in the following recipes. Using explicit conversion, you tell Oracle how you want types to be converted. Implicit conversion is automatically performed by Oracle. There are many datatypes that can be converted using implicit type conversion. However, it is not recommended that you rely on implicit conversion, because you never know exactly how Oracle will convert something. The recipes in this chapter will show you more reliable explicit conversion techniques that will give you the ability to convert types in such a way that your application will be rock solid.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.45.49