Turn on the flash back databaseALTER DATABASE flashback on;ALTER DATABASE open;Modify Date Time display format:Alter session set nls_date_format= ' Yyyy-mm-dd hh24:mi:ss ';View the Flashback database log information in the system view
Now there is a need: a document table to be partitioned by month, and if it is on Oracle 10g, only one field can be added. The Oracle 11g is not the same, you can use virtual column processing.Sql> select * from V$version;BANNER----------------------
0 ORDER by Asc/desc default ascendingOrder BY Column name | expression | alias | serial numberPut the space behind: ORDER by Desc nulls last1 grouping function--Automatically filters null valuesCount (*|distinct|clumn) Max min sum avgSelect SUM
One: Version informationOperating system version: AIX 61009Database version: 11.2.0.3.11 (RAC)Two: Error description1) Crsctl Stat res-t command to view the CRS resource status, Discover "Ora." Listener.lsnr "Resource Status exception:Ora.
The index is like the directory of a dictionary. With the dictionary directory, we can find the items we need very quickly. The same is true for databases. With an Oracle database index, related statements can quickly locate the location of a
http://blog.163.com/succu/blog/static/193917174201252911727149/1.sessionsAmong the limits set by the initialization parameters, the best known estimate is that the Sessions and processes Sessions parameters specify the number of Sessions that can
Oracle field typeHttp://www.cnblogs.com/lihan/archive/2010/01/06/1640547.html
Field type
Describe
Field length and its default value
CHAR (size)
String data used to hold the fixed length (size) byte.
Oracle queries the month for how many days, the code is as follows:Select To_number (Add_months (trunc (' 2014-11-4 11:13:53 ', ' yyyy-mm-dd hh24:mi:ss '), ' mm '), 1)-Trunc (' To_date (' 2014-11-4 11:13:53 ', ' yyyy-mm-dd hh24:mi:ss '), ' mm '))
Oracle Intercept string Function substrSubstr The Intercept string function in Oracle. The syntax is as follows: substr (String, start_position, [length]) Parametric analysis: String String value Start_position The initial position of the truncated
In Oracle 10G or 11G versions, the reasonable setting of the shared pool size has a significant impact on the performance of the Oracle database.The size setting rules for the Shared pool are as follows:1. Find a reasonable value for the shared pool
1. Log in as dBA$ sqlplus sys/[email protected] as SYSDBA (under Command Window)You can also use PL/SQL2. Create a temporary table space1 Create Temporarytablespace jiashubing_temp2Tempfile'E:\app\USER\oradata\orcl\jiashubing_temp.dbf' 3 size
Two date Type fields: Start_date,end_date, which calculates the time difference between these two dates (in days, hours, minutes, seconds, milliseconds, respectively):Days:ROUND (To_number (end_date-start_date))Hours:ROUND (To_number (end_date-start_
Error one: After configuring the source and target databases, create a replication administrator. After you connect the replication administrator, perform the maintain_table process in the Source library:declare v_tables dbms_utility.
Union, which is combined with two result sets, excluding duplicate rows, and sorting the default rules;Union all, which is set up for two result sets, including repeating rows, without sorting;Intersect, the intersection of two result sets,
CREATE TABLE Test(NO number,VALUE VARCHAR2 (100),NAME VARCHAR2 (100));--------------------------------------INSERT INTO TestSELECT * FROM(Select ' 1 ', ' a ', ' Test 1 ' from dual UNION ALLSelect ' 1 ', ' B ', ' Test 2 ' from dual UNION ALLSelect ' 1
In Oracle, sequence is the so-called serial number, each time it takes its own initiative to add it, usually in order to be ordered by serial number place.1. Create SequenceYou first have to have create sequence or create any sequence
Syntax for adding a field: ALTER TABLE tablename Add (column datatype [default value][null/not null],....);Modify the syntax of the field: ALTER TABLE tablename modify (column datatype [default value][null/not null],....);Syntax for deleting a field:
Common SQL statements for oracle project deployment and maintenance
Hello everyone, this is some of the oracle Database SQL statements that are most commonly used when I deploy a project to the site.
-- Create a data table spaceCreate tablespace
Oracle Query Optimization
1. Reasonably sort query Conditions
Oracle uses the bottom-up sequence to parse WHERE data. From the perspective of performance optimization, we recommend that you write the conditions that can filter out a large number of
Oracle dynamic SQL statements
Dynamic SQL return cursor:
Create or replace procedure partition (p_regioncode in number, p_pscode in number, p_outputcode in number, p_pollutantType in number, Region in varchar2, p_attencode in varchar2, p_checkstatus
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