|
su.dbms.sql- SU.DBMS.SQL ------------------------------------------------------------------ From : Andrei Sokolik 2:5022/2.20 17 Apr 2001 17:18:16 To : Andrian Diorditsa Subject : temp tables in oracle8 -------------------------------------------------------------------------------- 17 Apr 01 10:33, Andrian Diorditsa wrote to All: AD> Hello all! AD> Подскажите плс как в oracle 8.1.7. опpеделить вpеменные AD> пеpеменные(таблицы) для одного соединения. точнее мне нyжно пpи AD> полyчение connection к базе данных создать пеpеменные только для AD> данного соеденения (ex. user_name) , и котоpые напpимеp бyдyт select user from dual; и никаких временных таблиц :) AD> использоватся в тpигеpах (ex для yчета кто что делает и кидять все в AD> таблицy history). CREATE GLOBAL TEMPORARY TABLE ... [ON COMMIT DELETE/PRESERVE ROWS]; === Cut === GLOBAL TEMPORARY Specify GLOBAL TEMPORARY to indicate that the table is temporary and that its definition is visible to all sessions. The data in a temporary table is visible only to the session that inserts the data into the table. A temporary table has a definition that persists the same as the definitions of regular tables, but it contains either session-specific or transaction-specific data. You specify whether the data is session- or transaction-specific with the ON COMMIT keywords (below). === Cut === === Cut === ON COMMIT The ON COMMIT clause is relevant only if you are creating a temporary table. This clause specifies whether the data in the temporary table persists for the duration of a transaction or a session. DELETE ROWS Specify DELETE ROWS for a transaction-specific temporary table (this is the default). Oracle will truncate the table (delete all its rows) after each commit. PRESERVE ROWS Specify PRESERVE ROWS for a session-specific temporary table. Oracle will truncate the table (delete all its rows) when you terminate the session. === Cut === Andrei --- GoldED/W32 3.0.1 * Origin: С пивом по жизни. (FidoNet 2:5022/2.20) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /su.dbms.sql/26883adc7d94.html, оценка из 5, голосов 10
|