ORACLE Time Usage SummaryOracle month, year, week dataMonth Data SQL codeSELECT * FROM table t where T.create_date >=trunc (sysdate, ' MM ') and T.create_dateCurrent year data SQL codeSELECT * FROM table t where T.create_date >=trunc (sysdate, '
As we all know, MySQL InnoDB storage engine is very similar to Oracle, support transactions, row-locking, after the actual test, InnoDB and Oracle a relatively large difference point, in this test case, the same data, The InnoDB single-line storage
[ERR] ora-00001:unique constraint (...) violated
Violates a unique constraint, a field with a unique constraint, no duplicates, can be a space, and a space can only appear once. such as the primary key of the data
[ERR] ORA-00904: "XXX": Invalid
Oracle Log View
A Path to Oracle log:
Login: Sqlplus "/as sysdba"
View Path:sql> select * from V$logfile;
Sql> select * from V$logfile; (#日志文件路径)
Two What the Oracle log file contains: (The number of logs may be slightly
Problem
When the development of the debug to an update of the SQL statement, the program will not move, and then I tried on the plsql, found that Plsql has been in the display is being implemented, and so long time no results. But it's strange that
How to view the Oracle version and what options are installed.
System environment:
1, operating system: Windows 2000
2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
3, Installation path: c:/oracle
Description
1. View database
If you have previously installed Oracle, you can clear it by using the following command:
sudo rm-rf $ORACLE _home
sudo rm/etc/oratab
sudo rm/etc/orainst. Loc
The two files in/etc are automatically generated when the root.sh is run during the
The concept of Grang:A cursor is a memory workspace of SQL that is defined by the system or user as a variable. The role of a cursor is to temporarily store blocks of data that are extracted from the database. In some cases, the data needs to be
1 Trigger
The SQL statement is as follows:
Create or Replace Trigger Trigger_name
Before insert on Your_sid.tablename
For each row
Begin
Declare
I number;
Cursor cur is select MAX (id) from Your_sid.tablename;
BEGIN
Open cur;
FETCH cur into i;
Ubuntu installation Oracle 10g
Directory
1. Installation Preparation
1.1. Set up user
1.2. Create a directory and set permissions
1.3. Change Configuration
1.4. Installation
1.5. Start/Stop Oracle
1. Installation Preparation
Before installation
The query process for a SELECT statement by an Oracle database is shown in the following illustration:
As we know from the above picture,
There are three main steps: The client sends a SELECT statement to the server, the server executes the SQL
ORACLE RAC principle in an application environment, all servers use and manage the same database in order to spread the workload of each server, requiring at least two more servers on the hardware, and a shared storage device. It also requires two
Using the EXP and IMP commands is one of the simplest and most common ways for Oracle to migrate data for backup. The method steps used under this record for later use.
First, use the command on the old library:
Exp userid=username/password@database
46. Abnormal
(1)
DECLARE v_temp number (4);
Begin select empno into V_temp from emp where deptno = ten;
Exception when too_many_rows then
dbms_output.put_line (' Too Many records ');
When others then
dbms_output.put_line ('
1, SET autotrace parameters
SET autotrace off----------------does not generate Autotrace reports, which is the default modeSET autotrace on EXPLAIN------Autotrace displays only the optimizer execution path reportSET autotrace on STATISTICS--only
Oracle Rank () over, Dense_rank (), row_number () difference
Suppose there is a student table student, the student's table has the name, the score, the course number, and now I need to sort the students ' grades according to the course.
SELECT *
a table function can accept a query statement or a cursor as an input parameter and can output multiple rows of data. The function can be executed in parallel, and the data stream can be continuously output, known as pipeline output. The table
equality in Oracle is =, inequality is!= and <>
1. The use of 1<>1:
For situations where the structure does not take data, for example:
CREATE TABLE Table_temp tablespace tbs_temp as
SELECT * from Table_ori where 1<>1
Build a table
1 Status Query
launch status
SQL Statement /p>
results
Nomount
Select Statu s from V$instance;
started
select Open_mode from v$database;
ERROR at line 1:
Oracle Predefined 21 System exception types
Access_into_nullNo object definedCase_not_foundIf the case does not contain the corresponding when, and if no ELSE is setCollection_is_nullCollection element not initializedCurser_already_openCursor
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