Home » SQL & PL/SQL » SQL & PL/SQL » Global temporary tables
Global temporary tables [message #240202] Thu, 24 May 2007 06:24 Go to next message
akkumar81
Messages: 144
Registered: February 2007
Location: india
Senior Member

Dear friends,

create global temporary table temp_h (
hierarchy_level_uid number(19) not null,
version number(10) not null,
name varchar2(255),
description varchar2(255),
umc_type_name varchar2(64) not null,
umc_type number(10) not null,
hierarchy_level_value number(10),
last_modified date not null
) on commit preserve rows
;

insert into temp_h
(HIERARCHY_LEVEL_UID, NAME, VERSION, DESCRIPTION,
UMC_TYPE_NAME, UMC_TYPE, HIERARCHY_LEVEL_VALUE,
LAST_MODIFIED)
values
(HIBERNATE_SEQUENCE.nextVal, 'Queue', 0, '-',
'HIERARCHY_LEVEL', 5, 1, DATE '2006-01-01')
;
insert into temp_h
(HIERARCHY_LEVEL_UID, NAME, VERSION, DESCRIPTION,
UMC_TYPE_NAME, UMC_TYPE, HIERARCHY_LEVEL_VALUE,
LAST_MODIFIED)
values
(HIBERNATE_SEQUENCE.nextVal, 'CSR', 0, '-',
'HIERARCHY_LEVEL', 5, 2, DATE '2006-01-01')
;

i insert these rows.

what happens ,why use on commit preserve rows in global tmptable.

please tell me,exact replies..

Arun..




Re: Global temporary tables [message #240207 is a reply to message #240202] Thu, 24 May 2007 06:28 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
To get an exact reply, you probably need an exact question, which yours isn't.

"On commit, preserve rows" means the rows will survive the user issuing a commit but disappear when the user disconnects from the database.

[Updated on: Thu, 24 May 2007 06:29]

Report message to a moderator

Re: Global temporary tables [message #240209 is a reply to message #240202] Thu, 24 May 2007 06:31 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Arun,

May I ask you a question?
You seem to be working your way into Oracle (which is good) by means of a course, or a book or so, because you keep coming up with new items you have questions about.
I wonder how it is possible you have an example construct for a global temporary table, together with some sample inserts, but you are not able to find what 'on commit preserve rows' means.
This should be on the same page, or even on the previous.

Please enlighten me on how you are studying Oracle.
Previous Topic: Indexing
Next Topic: SYSDATE from another database, how to get?
Goto Forum:
  


Current Time: Sun Dec 04 16:27:39 CST 2016

Total time taken to generate the page: 0.20320 seconds