1 SESSION 2 >TRUNCATE TABLE TMP_TEST; 2 3 Table truncated. 4 5 6 SESSION 1 >DROP TABLE TMP_TEST; 7 8 Table dropped. 事务级临时表 Step 1:在会话1中创建事务级全局临时表。 1 SESSION 1 >CREATE GLOBAL TEMPORARY TABLE TMP_TEST 2 2 ( NAME VARCHAR2(12) ) ON COMMIT DELETE ROWS; 3 4 ...
Step 4:如果在会话2中先清空数据,然后去会话1中删除表则可顺利完成 1SESSION2>TRUNCATETABLETMP_TEST;23Tabletruncated.456SESSION1>DROPTABLETMP_TEST;78Tabledropped. 1. 2. 3. 4. 5. 6. 7. 8. 事务级临时表 Step 1:在会话1中创建事务级全局临时表。 1SESSION1>CREATEGLOBALTEMPORARYTABLETMP_TEST22( ...
SESSION 2 >TRUNCATE TABLE TMP_TEST; Table truncated. SESSION 1 >DROP TABLE TMP_TEST; Table dropped. 事务级临时表 Step 1:在会话1中创建事务级全局临时表。 SESSION 1 >CREATE GLOBAL TEMPORARY TABLE TMP_TEST 2 ( NAME VARCHAR2(12) ) ON COMMIT DELETE ROWS; Table created. SESSION 1 >INSERT IN...
1SESSION2>TRUNCATETABLETMP_TEST;23Tabletruncated.456SESSION1>DROPTABLETMP_TEST;78Tabledropped. 事务级临时表 Step 1:在会话1中创建事务级全局临时表。 1SESSION1>CREATEGLOBALTEMPORARYTABLETMP_TEST22( NAMEVARCHAR2(12) )ONCOMMITDELETEROWS;34Tablecreated.56SESSION1>INSERTINTOTMP_TEST72VALUES('Kerry');891...
ORA-14452: attempt to create, alter or drop an index on temporary table already in use during the drop of a temporary table Solution Sign In To view full details, sign in with your My Oracle Support account. Register Don't have a My Oracle Support account? Click to get started! In...
1SESSION2>TRUNCATETABLETMP_TEST;23Tabletruncated.456SESSION1>DROPTABLETMP_TEST;78Tabledropped. 1. 2. 3. 4. 5. 6. 7. 8. 事务级临时表 Step 1:在会话1中创建事务级全局临时表。 1SESSION1>CREATEGLOBALTEMPORARYTABLETMP_TEST22( NAMEVARCHAR2(12) )ONCOMMITDELETEROWS;34Tablecreated.56SESSION1>INSE...
临时表在会话结束后会被truncate,当然,truncate也不会影响其它的会话。这个操作解除了临时表同当前会话之间的关系,只有这样,才能使用drop语句删除临时表。不过如果此时还有其它会话在使用这个临时表,那么drop操作自然也会失败。 上面所说的情况是针对使用 CREATE GLOBAL TEMPORARY TABLE XXXX (...) on commit preserve...
ORA-14452: attempt to create, alter or drop an index on temporary table already in use 经查,该错误的解释为: Cause: An attempt was made to create, alter or drop an index on temporary table which is already in use. Action: All the sessions using the session-specific temporary table have...
1SESSION2>TRUNCATETABLETMP_TEST;23Tabletruncated.456SESSION1>DROPTABLETMP_TEST;78Tabledropped. 事务级临时表 Step 1:在会话1中创建事务级全局临时表。 1SESSION1>CREATEGLOBALTEMPORARYTABLETMP_TEST22( NAMEVARCHAR2(12) )ONCOMMITDELETEROWS;34Tablecreated.56SESSION1>INSERTINTOTMP_TEST72VALUES('Kerry');891...