Tag: Oracle

Python3 with Oracle Database

Installation These instructions are for Mac OS: First install homebrew. Never use sudo for brew. Install Python3. The installation comes with pip3. Install cx_Oracle, the library that allows python3 to…

Oracle decode() function

Decode function has the same functionality as an IF-THEN-ELSE statement. It is present in Oracle 9i and above. It has the syntax For example, This is like saying the following…

What is an Oracle Package

A package is an encapsulated collection of related PL/SQL types, objects, procedures, and other program objects. Packages have a package specification and a package body. Package specification declares constants, variables,…

Commonly used code in Oracle

Changing case To change the first letter of the word to cap, use the inicap function. Use upper to covert to uppercase and lower to convert to lower case. Examples:…

What is PL/SQL

Procedural Language extension of SQL (PL/SQL) combines SQL with procedural programming features such as looping, conditionals, and reusable blocks. PL/SQL engine processes PL/SQL statements. PL/SQL statements can reside on the…

Oracle NVL and NVL2 functions

NVL function NVL function can be used to substitute a value when null in encountered. It has the following syntax: If string has a value, it will be displayed. If…

Listing Objects in Oracle

If you want to list tables in MySQL, you simply type the following command: Oracle does not provide such a short cut. You have to type the following command: The…