--oracle implement self-increment id--create a T _studentinfo table The CREATE TABLE t_studentinfo ("id" integer NOT NULL primary key, Xsname NVARCHAR2 (+) NOT NULL, Xsage integer NOT NULL, Mobile varchar (n), Email varchar (+), Address
In oracle 12th, the group by statement is used, and the group by rollup, decode, grouping, nvl, nvl2, nullif, RATIO_TO_REPORT statements are used.
1.DecodeSimilar to stream data statements such as if... then, case... when...
Decode(Condition, value 1
This article mainly introduces the usage of Oracle merge into. For more information, see
In many cases, the following situation occurs: if a piece of data already exists in the table, update it. If it does not exist, insert new data. if you do not
A trigger is a special type of subroutine stored in a database. It cannot be called directly by users, but is automatically triggered by the system when a specific event or operation occurs.
Call execution. The trigger cannot accept parameters.
1. Regular Expression of question 3rd
Regular Expressions only search, replace, format, and other functions. Regular Expressions are usually used for back-reference formatting. length and concatenate are not calculated.
2. Delete columns with
Error reported by scott user set autotrace onSCOTT @ TEST0422> set autotrace onSP2-0618:Cannot find the Session Identifier. CheckPLUSTRACERole is enabledSP2-0611: Error enabling STATISTICS reportSCOTT @ TEST0422> conn/as sysdbaConnected. SYS @ TEST04
If you accidentally overwrite the previous stored procedure, You have to flash back quickly. The longer the duration, the less likely it will be to flash back. The principle is very simple. The definition of a stored procedure is a data dictionary.
Oracle optimized or replaced with in, exists, and union statements. There is no problem in testing!
Select the appropriate statement based on the actual situation! If there is an index, or full table scan, in and not in should also be used with
In PL/SQL programs, cursors are often used for transactions that process multiple rows of records. When a query statement or data manipulation statement is executed, a set of records may be generated or processed. A cursor is a memory area allocated
From the table above, we can see that a database is composed of multiple tablespaces, one tablespace is composed of multiple segments, and one segment is composed of multiple partitions (extent) A zone is composed of multiple blocks.
Store it
Environment: win7_x64, oracle11g
Description: The connection fails on the first day of the first day;
2: pl SQL developer Connection Tool, self-installed oracle database, and installed Client
3: oracle clients are not required when oracle is
A pos system has a large application volume and a large data volume! Statistical analysis of historical transactions affects another application to a certain extent. The two applications are OLTP and OLAP respectively.
In fact, many projects have
1. Create your own VARCHAR2ARRAY type
CREATE OR REPLACE TYPE "VARCHAR2ARRAY" as table of varchar2(300);
2. Create the function SPLITSTR
Create or replace function "SPLITSTR" (p_str IN VARCHAR2, p_delimiter IN VARCHAR2) RETURN varchar2array IS/***
I. ORACLE physical architecture
Explanations:
PGA: private memory zone, which is only used by the initiator.
After a user logs on, the information is saved in PGA.
If the memory is not enough, oracle will complete it in the temporary
I. Users
View the default tablespace of the current user
SQL> select username, default_tablespace from user_users;
View the role of the current user
SQL> select * from user_role_privs;
View the system and table-level permissions of the current
1. Think about the problem
In a table, an id column (integer) exists. When a user wants to add a record, this column will automatically grow from 1. How can this problem be solved?
2. Introduction
Oracle uses sequence processing to automatically
In the OLTP system, nested connections account for about 70%, hash connections account for 20%, and merge sorted connections account for 10%.Nested connection
Algorithm: Nested join selects a small table as the driver table from two tables, and a
Limited result set
In Oracle, it is very useful to use the ROWNUM field. Generally, you can use it to do two things:
1. Execute the top-N query. This is similar to the LIMIT Syntax of other databases. (Search for the first n pieces of data)
2.
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.