Category Archives: Database

Joins – Left outer, Right outer and full outer

SQL Joins in Oracle

The purpose of SQL join is to combine rows from multiple tables. SQL join is performed by the where clause which combines two or more tables in an SQL statement. There are four types of joins which described below: INNER JOIN or sometimes called SIMPLE JOIN LEFT OUTER JOIN or sometimes called LEFT JOIN RIGHT

How to create a PIVOT table in Oracle.

Create a Pivot Table in Oracle

First create a PLANNING table in oracle using following script. CREATE TABLE PLANNING (CITY VARCHAR2(25), TYPEOFCITY VARCHAR2(20), CONSUMERS NUMBER(20), SURVEYEDCONSUMERS NUMBER(20)); Now insert some dummy records in the table. insert into PLANNING values ('AJMER','URBAN',85589,45836); insert into PLANNING  values ('AJMER','RURAL',13853,8328); insert into PLANNING values ('BHILWARA','URBAN',54149,27327); insert into PLANNING values ('BHILWARA','RURAL',8384,4331); insert into PLANNING values ('NAGOR','URBAN',49752,43919); insert

Siteground SALE
60% OFF SiteGround WordPress Hosting – $3.95/month (Exclusive Offer !!!)