1. Oracle configuration and migration tool ----> net configuration Assistant2. Local net service name configuration ----> Add ----> service name (which is also a global database name, which can be set by others) ----> TCP ----> Host Name (IP address
In Oracle, there are two optional parsing processes for a submitted SQL statement: Hard parsing and soft parsing.
A hard parsing requires parsing, creating execution paths, optimizing access plans, and many other steps. hard explanation not only
4) process 1. Basic Concepts: Oracle allows you to create and store compiled PL/SQL statements in the database.
Program This type of program includes processes, functions, packages, and triggers. We can save the business logic, business rules, and
Select ename from
(
Select ename, rownum rn from
(Select * from EMP order by empno)
Where rownum
)
Where rn> = 4;
This is because in the CBO optimization mode, Oracle can push the outer query conditions to the inner query to
Oracle job introduction
Main scenarios
Perform related operations on the background at regular intervals. For example, save the data of one table to another at every night, and 2. Back up the database at regular intervals.
It is difficult to
1. updates table products information based on whether the product_id field of table newproducts matches:SQL> merge into products P2 using newproducts NP3 On (P. product_id = NP. product_id)4 when matched then5 Update6 set P. product_name = NP.
Create or replace function fun_insertperson(P_id out number,P_user_name varchar2,P_password varchar2,P_real_name varchar2,P_birthday date)Return varchar2IsReturnval varchar2 (50 );BeginSelect seq_personid.nextval into p_id from dual;Insert into
Set serveroutput on;
Scalar:
Declare v_name mytable. name % type;
Begin
Select name into V _ name from mytable where id = & AAAAA;
Dbms_output.put_line ('name: '| V _Name );
Exception
When no_data_foundthen dbms_output.put_line ('no number ');
End;
The table has two fields: ID and name:Data available:1.;2. B;3. C;4, C;5. BSelect distinct name from table; --> name A B CSelect distinct name, ID from table --> ID name 1 A 2 B 3 C 4 C 5 B (only those with the same ID and name will be
Having is similar to where, and can be used to determine which record to choose.
Having determines the records to be displayed after grouping these records using group,
The difference is that the WHERE clause filters the result set before the group,
Transaction Processing: the so-called transaction processing is to ensure the integrity of the operation, all operations either succeed at the same time or fail at the same time.
The principle is as follows:
InOracleEvery window connecting to the
Error: not a single-component group Function
Example: Select deptno, count (empno) from EMP;
Error: not a single-component group Function
Cause:
1,If the grouping function is used in the program, you can use the following two cases:
Program
7) trigger 1. Two basic concepts: implement the constraints of complex business rules that are difficult to complete due to database integrity constraints; monitor various database operations to implement audit functions. Triggers are divided into:
I. Basic Concepts1) physical structure data files, control files, log files, parameter files, and backup files constitute the physical storage structure of the Oracle database.
Control file management and control data files and log files 0. The
-- 1. Create a dedicated user under PLSQL-- Create the userCreate user user1Identified by \ "user1 \"Default tablespace usersTemporary tablespace tempProfile default;-- Grant/Revoke role privilegesGrant DBA to user1;-- Grant/Revoke SYSTEM
Declare-- Write a row for each variable definitionV_num number: = 60; -- InitializationV_sal EMP. Sal % type; -- indicates that the data type of v_sal is the same as that of Sal in the EMP table.V_empsal v_sal % type; -- indicates that the variables
Connect by is used in structured queries. Its basic syntax is:Select... from tablename start by cond1Connect by cond2Where cond3;Simply put, a tree structure is stored in a table. For example, a table has two fields:The ID and parentid indicate the
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