Notes on truncate table
--- The following is a summary of the quotations of itpub's predecessors.
After truncate table, oracle recycles the index of the table and its table to the initial size, that is, the size of the initial al
into table. The merge condition is on (condition), which only updates the corresponding record in the into table when the condition is met, and when the condition is not satisfied, it can only add the corresponding data to the into table, and the data is only The data that corresponds to the current record in the using table
First, Analog truncate operation:Sql> Conn Scott/tigerSql> Select COUNT (*) from T;COUNT (*)----------13sql> truncate TABLE t;Second, restore the data of the TRUNCATE TABLE1. Download the HELLODBA Recovery tool to the database serverUse the terminal under Linux, as follows:Under Windows, enter the following URL:Http://
Oracle Databases perform unconventional recoveries through Oracle Dul after truncate deletion of a table of data in the absence of a backup1. Preparing the Oracle Dul test EnvironmentSql> Select COUNT (*) from T_xifenfei; COUNT (*)----------67854sql> desc T_xifenfei Name Null? Type-----------------------------------------------------------------------------OWN
Degree from strong to weak 1, drop table TB drop directly delete the form, no way back 2, truncate (table) TB Delete all data in the table, cannot be used with where 3, delete from TB (where) Delete data in a table (can make a row) difference:
Tags: similarities and differences point LLB Val pos foreign URI dex size segmentTRUNCATE table is functionally the same as a DELETE statement without a Where clause: Both delete all rows in the table. However, TRUNCATE TABLE is faster than Delete and uses less system and transaction log resources. The Delete statemen
Recently released to the market version of the frequent occurrence of database table corruption, the specific phenomenon is that the Select Table hint table does not exist, but to view the data file, the corresponding table of IBD and frm files are in.Through the statistics of multiple failures, found several frequentl
TRUNCATE table is functionally the same as a DELETE statement without a WHERE clause: Both delete all rows in the table. However, TRUNCATE TABLE is faster than DELETE and uses less system and transaction log resources. The Delete statement deletes one row at a time and rec
Truncate table t_test: Message 4711, level 16, status 1, 1st rows
The table 't_ test' cannot be truncated because it has been published for replication. Error table forwarding from http://technet.microsoft.com/zh-cn/library/cc645613 (V = SQL .105). aspx
4711
16
No
The
How to do the truncate operation for a primary table associated with a foreign key
The primary and Foreign keys are mandatory associations between two tables provided by the database. They can also be implemented at the application layer.
Advantages
Disadvantages
Primary and Foreign keys implemented by the database
Guaranteed by the database layer mechanism, no additional applica
While it's not recommended to use commands to delete things in a database table, these delete commands are always useful.When it comes to deleting table data, the biggest thing you can remember is the delete.However, we do database development and read database data. It's less for the other two brothers.Now to introduce the other two brothers, is to delete the table
Oracle has its own unique practices for truncate table operations. It takes almost the same time to truncate dozens of data records and tens of millions of data records,
Oracle only updates the data dictionary and does not operate on the actual data. It only needs to pull back the hwm location.
Sys @ orcl> Create Table
I suddenly thought of this problem recently and recorded it to consolidate my knowledge.
Tables, temporary tables, and table variables are used by many people. truncate Table @ table variables may report errors. I believe many people have encountered them, but there are few people who really think about why, after all
The TRUNCATE command clears all records in the Table in mysql and resets the table ID. Next I will introduce the usage and instance of TRUNCATE.
Truncate table deletes all rows in the TABLE
This is because the table with the truncate operation is still executing, and no commit is finished, at which point you can query V$locked_object to get which user's transaction is operating this table.
Experimental SimulationFirst, use the Scott user to enter the database and do the following for the existing table T1
PRM? DULfororacle restores the table truncated by truncate OracleDBA: PRM disaster recovery tool and Schema-level data recovery. PRMForOracleDatabase-schema-level oracle database data recovery features, PRM is ParnassusDataRecoveryManager is an enterprise-level Oracle Database disaster recovery tool. PRM can
PRM? DUL for oracle recover the table truncated by
When truncate an Oracle table, an error occurs:ORA-00604: A recursive SQL Level 1 error occurredORA-00904: "CURRENT_SCN": Invalid identifierThe analysis is due to the fact that a materialized view is built on the table:Select log_owner,log_table from All_mview_logs;Log_owner log_table---------------- ---------------Newsadmin Mlog$_ann_basinfoAfter deleting the materialized view Log
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.