Wednesday, January 9, 2013

Local Temporary tables


Local temporary tables are distinct within modules and embedded SQL programs within SQL sessions.
The syntax to create a Local Temporary table is:
DECLARE LOCAL TEMPORARY TABLE table_name ( ...);

For Example

DECLARE LOCAL TEMPORARY TABLE suppliers_temp
( supplier_id number(10) not null,
  supplier_name varchar2(50) not null,
  contact_name >varchar2(50)
);
This would create a local temporary table called suppliers_temp