can use "/" to execute this last SQL statement, or you can use the
The edit command to edit the last SQL statement.
The l command (list) (Sqlplus command) can display the last command in the buffer.
The Sqlplus command can be abbreviated
(3) DESC [table name]
This is a sqlplus command, notice that he is not an SQL
It is estimated that SQL * Plus is used almost at the beginning in Oracle,
After all, this tool can run on any platform running Oracle,
You can install this tool on the client or on the server,
To install the client, install the client software provided by Oracle,
On the server side, it is automatically installed when
, execution time: 156.3 seconds)
SELECT...
FROM EMP E
Where sal> 50000
And job = 'manager'
AND 25
Where mgr = E. EMPNO );
(Efficient, execution time: 10.6 seconds)
SELECT...
FROM EMP E
WHERE 25
Where mgr = E. EMPNO)
And sal> 50000
And job = 'manager ';
6. Avoid '*' in the SELECT clause '*'
When you want to list all columns in the SELECT clause, using dynamic SQL COLUMN reference '*' is a convenient metho
the parameter change to ":" symbol.3. Replace the proprietary SQL Server methods and functions with the corresponding Oracle methods and functions4. Run the SQL statement in PL/SQL developer to verify its correctness.
FAQs during conversion1. The table name and field name use the
Label:The need for the first few days is to have the SNF platform BS version of the Foundation program fully support the Oracle database. Look at this is a big project, because everyone knows that SQL and Oracle syntax has a lot of different, such as top, date acquisition, type, special keywords such as
Obtain SQL Execution plans from the most authoritative Oracle Database
This document is compiled and summarized based on relevant information. It mainly describes the most authoritative and correct methods and steps for obtaining SQL statement execution plans in Oracle databases. In addition, the meanings and usage of
dynamic SQL and provides some practical development skills at the end.2. dynamic SQL Program DevelopmentUnderstand the principles of dynamic SQL compilation, and master its basic development ideas. Since dynamic SQL is an "uncertain" SQL statement, its execution has its own
Oracle SQL * Plus is a client tool that interacts with Oracle. In SQL * Plus, you can run the SQL * Plus command and the SQL * Plus statement.
The DML, DDL, and DCL statements we usually call are
translation between Peoplesoft and Oracle: Note: LONGColumns cannot appear in these parts of SQL statements:
GROUPBYclauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements
The UNIQUE operator of a SELECT statement
The column list of a CREATE CLUSTER statement
The CLUSTER clause of a CREATE MATERIALIZ
:
SELECT * FROM (
select Z.type, Z.code, Row_number () over
(PARTITION by Z.type Order by Z.code) as code_id
Group_info z
)
WHERE code_id = 1;
Here the Over () is the Oracle analysis function
Refer to SQL Reference documentation:
Analytic functions compute a aggregate value based on a group of rows. They differ from aggregate functions in, They return multiple rows for each group.Analytic
dynamic SQL, and finally gives some practical development techniques.2. Dynamic SQL program DevelopmentThe principle of dynamic SQL compilation is understood, and the basic development idea is mastered. Since dynamic SQL is an "indeterminate" SQL, its execution has its own
display to a width of n characters and 80 characters to the default width for this command. If you want to use example 3-3 's SQL statement to display all the columns in the EMP table, you will find that the displayed results are difficult to read. Example 3-3 Sql> SELECT *
2 from EMP; Example 3-3 results If your screen is large enough, then you can use the Sql
execution path. this function greatly improves SQL Execution performance and saves the use of www.2cto.com in memory.Iii. How to improve query efficiency using oracle statements: 1: where column in (select * from... where ...); 2 :... where exists (select 'x' from... where ...); the second format is far more efficient than the first one. IN Oracle, almost all IN
row_num fromUser_objectswhereRowNum Ten) T2whereNVL (substr (answer,t2.row_num*2-1,1),'-')!='-'
Order byAnswer Note: User_objects mainly describes all the objects that are established by the current user through the DDL. Includes tables, views, indexes, stored procedures, triggers,Packages, indexes, sequences, and so on. is a view of the Oracle dictionary table. This can also be done in other ways, such as dual, where the content bySo don't dual
. Since dynamic SQL is an "indeterminate" SQL, its execution has its corresponding characteristics. The Execute immediate statement is provided in Oracle to execute dynamic SQL with the following syntax:Excute immediate Dynamic SQL statement using binding parameter
The ORACLE tutorial is as follows: Oracle PL/SQL getting started.
I. Objective of PL/SQL
Structured Query Language (SQL) is a common Language used to access relational databases. It is a fourth-generation Language (4GL) and its execution features are non-procedural, that is,
specifically responsible for data extraction in the server-side process. The function is to return the queried data results to the client process to complete the entire query.
Oracle SQL statement execution sequence
(8) SELECT (9) DISTINCT (11)
(1) FROM
(3) JOIN
(2) ON
(4) WHERE
(5) GROUP
(6) WITH {CUBE | ROLLUP}
(7) HAVING
(10) ORDER
1) FROM: Perform Cartesian Product (cross join) on the table in the FROM
Summary of oracle simple learning (1) -- SQL SQL language classification function example Database Control Language (DCL) controls access to the database, GRANT, REVOKE, and other statement database definition languages (DDL) that authorize and REVOKE system permissions, such as startup and Shutdown) the create table and alter index statement www.2cto.com used to
you can limit the number of records through the WHERE clause, you can reduce this overhead.Optimization techniques for SQL (6)Conditional use of Union-all instead of union: This will increase the efficiency by 3 to 5 times times.Optimization techniques for SQL (7)In the SQL statement that contains the subquery, pay special attention to reducing the query on the
We know that every RDBMS has its own characteristics in SQL. So today, let's take a look at what features Oracle has.
Meaning.
Feature 1:Oracle analysis functions and window functions:Syntax:
Function_name (Over (For example:Sum (SAL) over (partition by deptno order by ename rows ...)Where sum is the function name,Over () is a keyword. The direct point is to add
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.