This articleArticleThis article mainly introduces the usage of temporary tables in Oracle databases, hoping to help you learn and work.
I. Syntax
In Oracle, you can create two types of temporary tables:
(1) Session-specific temporary tables
Create global temporary ()
Statements such as Oracle table structure, owner, and all tablesSelect * From dba_tables query all tables in the system
Select * From all_tab_columns where table_name = 'tablename' and owner = 'ownername' query a specific table structure in the system.
Select * From tab where tabtype = 'table' query all tables under the current user. tabtype is variable.
Selec
tables (mainly in master or tempdb) are included. common DBA tables 2.1. dba_users Database User Information dba_segments table segment information dba_extents data zone information dba_objects database object information dba_tablespaces database tablespace information partition Data File Settings information dba_temp_files temporary data file information rollba
Sometimes, for the synchronization of some tables in two Oracle databases, we can use the tables required by the source database exp and then execute imp import locally.
Operation logic: first, execute the drop table command locally to delete the table to be replaced from the table required by the remote database exp, note the order in which
PL/SQL statements are the optimizer executed by the Oracle database, which has cost-based optimizer CBO) and rule-based optimizer RBO ). We all know that the optimization methods of RBO depend on a set of strict syntax rules.
The "Execution Plan" of PL/SQL statements is not affected as long as the statements written according to the rules are changed regardless of whether the data table or index content changes ".
CBO has been introduced since
risky, hands-on need to be cautious
Oracle Research Center
http:// Www.oracleplus.net
This article by the master cherish the original share, reproduced please try to retain the site website --------------------------------------ORACLE-DBA---------------------------------------- The most authoritative and professional example of
A useful feature for any type of programming is the ability to store and use temporary data. oracle provides us this ability with temporary tables. these temporary tables are created just like any other table (it uses some special modifiers), and the data definition of this table is visible to all sessions, just like regular
Label:Reprint Address: http://www.cnblogs.com/kerrycode/p/3285936.html Temporal table Concepts A temporary table is a database object that is used to temporarily save temporary data (or intermediate data), which is somewhat similar to a normal table, but is quite different. It can only be stored in a temporary table space, not a user's tablespace. An Oracle temporary table is a session or transaction level that is visible only to the current session o
Do not know what to do, the data sheet locked, unable to update.Baidu has a variety of methods, summarized as follows.Check the locked table (two sentences are available):SELECT * from v$session T1, V$locked_object T2 where t1.sid=t2. session_idSelect Sess.sid, sess.serial#, Lo.oracle_username, Lo.os_user_name, Ao.object_name, Lo.locked_mode from V$locked_ Object lo, dba_objects ao,v$session sess where ao.object_id = lo.object_id and lo.session_id = Sess.sid;To view the user and time of the lock
. Dba_thresholds the upper value of the warning. How many alarms are used for the tablespace. The background process Mmon monitors this information. Dba_outstanding_alerts last 10 warning messages. Dba_alert_history historical information about the warning. Table: System_privilege_map, system permissions information, such as SYSDBA and sysoper that are frequently used, are system permissions. Also like create Tablespace,drop tablespace, note that the drop table is not a system permission, and th
How to export data and tables from SQL Server and Oracle
1. Export and import data to a database in SQL Server1. Select the database to be transferred in the SQL Server Enterprise Manager, right-click and choose all tasks> back up the database.2. Select database for backup-complete,Target backup to press addEnter a custom backup database file name (Suffix: BAK) under the hard disk of the SQL Server server)
In Oracle8i or a later version, you can create two types of temporary tables: 1. Session-specific TEMPORARY table create global temporary Although the temporary table created by create global temporary table MyTempTable exists, you can try to insert a record and then attach it to select using other connections. The record is empty. See it, I will post the following two statements: -- ON COMMIT DELETE ROWS indicates that the temporary table is specifie
whitespace (" product_id "CHAR (5) enclosed by X ' 7C '," Sales_da TE "DATE" dd-mon-yyyy AD HH24:MI:SS "enclosed by X ' 7C '," Sales_cost "CHAR (3)
Enclosed by x ' 7C ', "STATUS" CHAR (8) enclosed by x ' 7C ') This proves that the table structure in all the control files is the structure of the whole table, not the partition table, in the actual process, you can consider the swap partition to implement -----------------Tips--------------------
operation is risky, hands-on need to be cautious
user account (or the corresponding ID of the account ). When other users log on to the system, the system first queries from this temporary table to check whether the same user records exist. If yes, the user will be rejected and the user will be warned that the same user has logged on. When the user exits the system normally or ends the current session due to other reasons, the database system will clear the contents of this table. In this way, you can log on to the system even if you log on t
test23 Data Test449000 Data testDescription The first partition has: 1, 23, 44900 of these data, that is, when inserting, Oracle is to find the partition, in fact, the partition of the seed table [url=]Management[/URL] can also be done through the program, Oracle to provide you with a set, you can do it yourself. The rest of the data on their own check, is a truth.2, zoning applications:Generally a table o
If there are more than two associated tables in an SQL statement, what is the order of connection? ORACLE first connects two tables to generate a result set, and then associates the generated result set with the next table. continue until all tables are connected; finally, we will analyze several different connection m
condition "Japan" and the conclusion "Japanese".2. Type "Indeterminate" in the cell next to the condition. This action will apply an alternative conclusion of "indeterminate".The rule table should resemble the following:When a rule is compiled, the decision tables written in Excel are converted from Oracle policy Modeling to internally generated rulesThe table. The table above will create the following rul
Oracle alarm logs are frequently seen. The following describes how to access oracle alarm logs by using oracle External tables.
1. Create a user and grant permissions
SQL>createusercheckeridentifiedbypassworddefaulttablespaceusersquotaunlimitedonusers;
SQL>grantconnect,resource,createanydirectorytochecker;
Tags: delete object date ora suffix case border SQL modify table Oracle tableIn fact, for a database, each table represents a database object, and the database object refers to all the operations of the DDL definition, for example: tables, views, indexes, sequences, constraints, and so on, all belong to the object, so the establishment of the table is the establishment of objects, and the operation of the o
The db_buffer_pool of oracle consists of three parts:Buffer_pool_defualtBuffer_pool_keepBuffer_pool_recycleIf you want to pin the table to the memory, that is, pin the table to the keep area.Related commands:Alter table... storage (buffer_pool keep );This command caches the table in the keep area if it is cached.You can use the following statement:Select table_name from dba_tables where buffer_pool = 'keep '; it is found that the modified table is pla
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.