Oracle Usage Summary

Source: Internet
Author: User

Error deleting database table resolution method

Sql> ALTER TABLE test1 enable row movement;//The line move function must be started before flash back otherwise an error is reported: ORA-08189: Cannot flash back to table because the line move feature is not enabled

Sql> FLASHBACK TABLE test1 to TIMESTAMP to_timestamp (' 2013-06-03 15:35:00 ', ' yyyy-mm-dd hh24:mi:ss ');// Note: The recovery point must be before the data is deleted. This is 2013-06-03 before 15:35:57.

INSERT into Bookuser SELECT * from Bookuser as of TIMESTAMP sysdate-100/1440 100 minutes ago

Flash back operation
FLASHBACK TABLE T_scm_cost_unit to before DROP;

Use union ALL to place two query results in a table, ' inbound ' as Mark, new column, where the data is ' inbound '

(SELECT t0.id material_id,T0. Material_no,t0.name material_name,T0. Specification,T1. Plan_price plan_price_in,T1. AMOUNT amount_in, ' warehousing ' as Mark

From T_scm_store_in_detail T1 the left JOIN t_ems_material T0 on t0.id= T1. material_id

GROUP by T0.id,t0. Material_no,t0.name,t0. Specification,t1. Plan_price,t1. AMOUNT, ' warehousing ')
UNION All
(SELECT t0.id material_id,t0. Material_no,t0.name material_name,t0. Specification,T2. Plan_price plan_price_out,T2. AMOUNT amount_out,' out of the library ' as Mark

From T_scm_store_out_detail T2 left JOIN t_ems_material T0
On t0.id= T2. material_id

GROUP by T0.id,t0. Material_no,t0.name,t0. Specification,t2. Plan_price,t2. AMOUNT, ' Out of the library ')

Oracle Usage Summary

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.