Auto-increment of oracle trigger + sequence id

1. select * from s_hrdata2. create Sequence: create sequence s_hrdata_SEQUENCE start with 1 increment by 13. CREATE Trigger: create or replace trigger s_hrdata_trgger before insert or update of id on s_hrdata for each row begin select

View table space usage in ORACLE

SQL code for viewing the usage of each ORACLE tablespace -- select tablespace_name, sum (bytes)/1024/1024 from dba_data_files group by tablespace_name; -- select tablespace_name, sum (bytes) /1024/1024 from dba_free_space -www.2cto.com-group by

Some tips of plsql developer

Some tips of plsql developer 1. After logon, My Objects is automatically selected by default. By default, after PLSQL Developer logs on, All objects will be selected in Brower. If the user you log on to is dba, to expand the tables directory, it

Oracle connect by Statement Analysis

In oracle, you can use the connect by clause to implement recursive queries. The basic syntax is: select... from where start with connect by order siblings by ; : filter condition used to filter all returned records. (The Association condition

Use of PL/SQL records

In PL/SQL, % ROWTYPE can be used as the row TYPE of a table, and % TYPE can be used as a field as the data TYPE, but several fields to be specified must be used as a data TYPE, you can use PL/SQL records. Definition Syntax of PL/SQL records: SQL

Analysis on the update of the MERGE statement and multi-Table Association in oracle

MERGE is a composite statement used to implement INSERT, UPDATE, and DELETE operations at a time. Syntax: merge into table/view using (TABLE/VIEW/SUBQUERY) ON (condition) [when metched then update set column = expr/DEFAULT [WHERE condition] www.2cto.

Summary of oracle Permissions

1. system permission management 1.1 three default users: oracle 9i sys change_on_install [as sysdba] -- sqlplus/as sysdba system manager www.2cto.com scott triger oracle 10 Gb or above sys. [as sysdba] set during system installation. scott triger is

Oracle online redefinition of non-partition table to partition table conversion

Online conversion from non-partitioned tables to Partitioned Tables: SQL> select * from v $ version; BANNER implements Oracle Database 10g Enterprise Edition Release 10.2.0.3.0-Prod PL/SQL Release 10.2.0.3.0-Production CORE 10.2.0.3.0 Production TNS

Differences between drop, delete and truncate in oracle

The differences between drop, delete, and truncate in oracle are described as follows:1. Both delete and truncate can delete the data in the table. However, compared with drop, the former only deletes the data and does not change the table structure.

ORA-01078: failure in processing system parameters Problems

Fault symptom: ORA-01078: failure in processing system parametersLRM-00109: cocould not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl10g. ora principle: in oracle9i and oracle10g, the database starts with spfile by default.

Three steps of Oracle Database startup: nomount, mount, and open

Three steps nomount, mount, and open for Oracle Database Startup: conn sys/sys as sysdbaShutdown abort; Startup nomount; select instance_name, status from v $ instance; www.2cto.com: select value from v $ spparameter where name = 'control _ files ';

Multi-level data aggregation

Solution: create table t_20120512_a (id varchar2 (6) primary key, cost number (3), www.2cto.com p2 number (3), p3 number (3 )) /create table t_20120512_ B (id varchar2 (6) primary key, name varchar2 (50), B varchar2 (100)/insert into t_20120512_a

Create Table with the prompt ORA-00959: tablespace 'mc _ data' does not exist

Create a table, prompting ORA-00959: tablespace 'mc _ data' does not exist solution first, first confirm the current user's tablespace. Select username, default_tablespace, temporary_tablespace from dba_users where username = 'mcmidyl'; www.2cto.com

Oracle Date and Time Range Query

Oracle Date and Time Range Query SQL code/* Date and Time Range Query */---------- create Date and Time Test table ‑ www.2cto.com create table testdatetime (ID integer not null primary KEY, createdate CHAR (10) NULL, startdate date null, enddate

Analysis of Oracle sessions and processes

The relationship between Oracle sessions and processes is sessions = 1.1 * processes + 5 www.2cto.com ----- experiment part ---- Microsoft Windows [version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. c: \ Documents ents and Settings \

Oracle External commands

Oracle External combined command oracle External combined command: To understand (+), the most important thing is that (+) is always placed on the side where information is scarce, and records on this side are displayed as null values. Example:

ORA-14048: partition maintenance operations cannot be combined with other operations

ORA-14048: partition maintenance operation cannot be combined with other operations today fannairu students imported database error, prompt: IMP-00017: Due to ORACLE error 14048, the following statement failed: "alter index" SYS_C009967 "unusable

Oracle uses stored procedures with Input and Output Parameters

Oracle uses a stored procedure with input and output parameters. It is still a bit troublesome to use the stored procedure. If you are not careful about the parameter errors, you are advised to use them less if you can use them less. Here I want to

Solve ora-12154 Problems

Solve the Problem of ora-12154 recently the project uses oralce 10g as the database, haven't touched for a long time, but vaguely remember that there is such a tool pl/SQL can be very convenient to operate the database. After pl/SQL is installed on

How to convert one row to multiple rows in ORACLE

The ORACLE line to multi-row problem/** the core solution is to generate a column from 1 to 10, as A "secondary column" **/select level l FROM dual connect by level /** Create a test TABLE T1, that is, table a mentioned by the landlord **/create

Total Pages: 2147 1 .... 1784 1785 1786 1787 1788 .... 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.