Use of table Truncation in oracle

If you delete a piece of data from a table in oracle, you can also perform rollback by performing the rollback operation (rollback). If you want to clear the data of a table www.2cto.com, if you do not want to perform rollback, you can immediately

Database flashback statements

Database flash back related statement 1 \ roll back the table to a certain time point: enable the row movement function before the flash back operation of www.2cto.com SQL code alter table emp enable row movement; execute the flash back statement:

Oracle sequence reset Statement 2

Oracle reset sequence Statement 2 SQL code www.2cto.com CREATE OR REPLACE PROCEDURE RESET_SEQUENCE (p_sSeqName IN VARCHAR2) IS n NUMBER (10); tsql VARCHAR2 (100 ); begin execute immediate 'select' | p_sSeqName | '. nextval from dual 'into n; n: =-(n-

Oracle Table Demo statement

Oracle Table Demo statement SQL code www.2cto.com -- Created on 2010/07/29 by WANGNAN declare -- Local variables here i1 VARCHAR2 (20): = '1'; i2 VARCHAR2 (20): = '1 '; i3 VARCHAR2 (20): = '2'; i4 VARCHAR2 (20): = '3'; i5 VARCHAR2 (20): = '3'; i6

Oracle left connection and right connection Query

Oracle left join, right join query in Oracle PL-SQL, left join and right join in the following way to achieve www.2cto.com view the following statement: SELECT emp_name, dept_name FORM Employee, Department WHERE Employee. emp_deptid (+) = Department.

Weird issues with Oracle Max Functions

The Oracle Max function generates a strange problem when writing another stored procedure, the following SQL statement www.2cto.com SELECT MAX (RE_DATE) INTO V_RE_DATE FROM T_RECORDINGWHERE ID = '20140901' is used'It is reasonable to say that the

An exception occurs when oracle uses the constraint name to view the table name.

The method for oracle to view the table name through the constraint name is that the exception is not dba first, but it is good to know more about oracle. To know which table an index belongs to, run the following SQL statement: select TABLE_NAME

Two sets of tables with similar Oracle Structures

For some reason, we need to create dozens of tables with similar structures in Oracle and start with DEL _ to record the cleaned data during data cleaning. For example, table 1 corresponds to DEL_TABLE1, but unfortunately, the PDM file is

SQL to avoid Recursion

SQL avoids recursion. Today, a tangle problem is found in the development project. Modify the SQL code www.2cto.com CREATE TABLE PRO_TYPE (PRODUCTTYPEID INTEGER NOT NULL, PRODUCTTYPENAME VARCHAR2 (50) according to the parent and child classes) not

From subquery instance application in Oracle

In Oracle, The from subquery instance applies the Oracle table complex query ---------------------------------------------------- subquery example in the word query www.2cto.com from: how to display the employee information higher than the average

Oracle Table Analysis

Oracle Table Analysis in my opinion, the database table is analyzed to obtain the statistical information of the table, so that the database selects the correct execution path when performing Table query and other operations, so when do we need to

Using shared storage to build oracle dual-host Load

Using shared storage to build oracle dual-host LoadPreparation environment: two servers and one storageWww.2cto.comShows the basic principles:Www.2cto.comEnvironment:Shared storage: 172.16.0.5DB1:Eth0: 192.168.1.1Eth1: 172.160.1Vip:

Oralce writes a paging Stored Procedure

Oralce writes a paging stored procedure with a returned value stored procedure (list result set) Case: Write a procedure, enter the Department number, and return information of all employees of the Department. The analysis of this question is as

SQLPLUS automatically saves executed SQL

SQLPLUS automatically saves the executed SQL. When learning oracle, it wants to record the executed commands and results. However, it is not a way to use SQLPLUS to save each time. It is quite troublesome to manually execute the spool, so I made a

Print calendar with PLSQL

I recently used PLSQL to print the calendar. After reading it, the concept suddenly feels empty. Not much gossip. I used PLSQL to write a calendar printing function. Www.2cto.com [SQL] create or replace package display_date is procedure display_spec_

PL/SQL daily question: Exception Handling-WHEN clause

PL/SQL daily question: Exception Handling -- WHEN clause question: www.2cto.com catch a divisor error ("ORA-01476: divisor is equal to zero ") in this case, all the other exceptions of "Bad division" must be transmitted to the calling block intact.

SO to order line Closed

SO to the order line Closed [SQL] www.2cto.com -- entered SELECT * FROM inv. mtl_sales_orders WHERE segment1 = 1054627; -- maid: 935491 SELECT h. flow_status_code, h. * -- header_id: 6577988 -- flow_status_code: entered FROM ont.

Nested cursor loops in oracle stored procedures

Create or replace procedure statement is begin DECLARE -- query A set of www.2cto.com CURSOR c_number is select number186, money186 from xh_number_186_t A where. number186 in (select n. number186 from xh_number_186_t n minus select t. service_id

How to view and modify the Oracle encoding format

How to view and modify the Oracle encoding format -- view the Oracle database character set: select userenv ('language') from dual; query result: www.2cto.com SIMPLIFIED CHINESE_CHINA.AL32UTF8 -- modify the oracle database character set: (in SQL

Code encapsulation in a trigger

Test preparation for code encapsulation in the trigger: www.2cto.com [SQL] hr @ ORCL> drop table t purge; Table dropped. hr @ ORCL> create table t (code number); Table created. hr @ ORCL> create table t_audit (code number, ins_date date); Table

Total Pages: 2147 1 .... 1696 1697 1698 1699 1700 .... 2147 Go to: GO

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.