When it comes to query theory, you first need to know the architecture of Oracle. The database service consists of two parts: an instance and a database file. The examples section includes the SGA (System Global area) and the PGA (Progam Global Area)
Oracle's EXP/IMP command is used to implement export/import operations to the database; the EXP command is used to bring data from the remote database server to the local, generating a. dmp file; The IMP command is used to import local database. dmp
Oracle executes external files:C:>sqlplus user/[email protected]sql> @new. sqlExecute multiple SQL files:1. Place all the files in the same directory and execute the command at the command line:c:>dir/b > D:/1.sqlAll the SQL file names are exported
Test forms using the Oracle database:--single-Table query data Syntax Select (query) * All/query fields, multiple fields, separating from table name--find information for all employeesSelect * fromscott.emp;Select * fromDept;--query all employee
Use rules for using keywords in Oracle:1. The query must be an equivalent connection.2. The columns in the equivalent join must have the same name and data type.There are a few things to keep in mind when simplifying connections with the Using
1.1.Basic ConceptsDatabase: Service process (Database read-write log process, etc.)+ memory (memory occupied)+ database files (database, etc.). table Space: The place where the data table is stored. A table space will have a corresponding . db file
Primary users and their roles in Oracle databases
No.
User name
Default password
Describe
1
Sys
Change_on_install
Super Administrator of the database
2
System
Manager
1 Status queries
Start state
SQL Statement
Results
Nomount
Select status from V$instance;
STARTED
Select Open_mode from V$database;
ERROR at line 1:Ora-01507:database not mounted
Pseudo- column: a pseudo-column in Oracle is like a table column (a column in a table), but it is not stored in a table, a pseudo-column can be queried from a table, but its values cannot be inserted, updated, or deletedCommon pseudo-Columns are
--To view the maximum number of connections to a databaseSelectValue fromV$parameterwhereName ='Processes';--change the number of database connectionsAlter systemSetprocesses = theScope =SPFile;--to view locked
One, date format conversion To_char (date, ' format '); Select To_date (' 2005-01-01 ', ' yyyy-mm-dd ') from Dual;select to_char (sysdate, ' Yyyy-mm-dd HH24:mi:ss ') from dual; Second, the number format conversionTo_char (number, ' format
--Each month in the time period, {0}: Start date, {1}: End Date Select To_char (Add_months (To_date ('{0}','yyyy-mm'), ROWNUM-1), 'yyyymm'As monthlist from DUAL CONNECT by ROWNUMMonths_between (To_date ('{1}','yyyy-mm'), To_
The dump function is used to determine whether a character type in a string belongs to number or stringStored ProceduresCreate or Replace procedurePro_isnum (i_stringinch varchar2, O_note outvarchar2) asstring1varchar2( +);--after the field is
Select Detail_num,carriage_num,ed_date,created_date from(Select RowNum id,detail_num,carriage_num,ed_date,created_date from(select detail_num,carriage_num,ed_date,created_date from xx order by created_date desc) where rownum) where id>= (? -1)
1. Basic dataSELECT * from Table_muen TID CODE NAME Parentcode0 first-sbzhyw Social Security integrated ROOT1 Second-sbzhyw-zzyw self-service first-sbzhyw2 Third-sbzhyw-ywcxydy business Query and print Second-sbzhyw-zzyw3 Four-sbzhyw-grcbzmdy
Oracle where condition execution sequence analysis 1, oraclewhere
(1) execution sequence of statement ParsingCreate a function for testingCreate or replace function F1 (v_in in varchar2)Return varchar2 ISV_out varchar2 (20 );BeginV_out: =
Solve the Oracle string Sorting Problem that contains numbers and special symbols.
Problem description:
A residential area needs to be sorted by the residential area, building, unit number, and room number. However, when sorted by the address
20171000011301_about rman1_faq .txt, 20171130 rman
Please refer to 1130.pdf about rman FAQ. txt-- // The previous test is too messy and some rman as copy tests are re-performed.1. Environment:SCOTT @ book> @ & r/ver1PORT_STRING VERSION BANNER--------
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