First, the basic operationNothing to do, organize the Oracle database related operations, later standby .....PS:SATP for user satp_data as table space1 1. Delete Table Space2 DROPTablespace Satp_data including CONTENTS anddatafiles;3 4 2. Deleting
Oracle take month-without the previous 0Today, just take the month and the number of days, if there are 0 in front of the month to remove 0. For example, 2010-01-08, the required result is 1-8. Leads to a series of SQL statementsFirst: Using
--Declaring a function--replace Replace put back--sal: Monthly SalaryCreate or Replace function Fn_get_avg_sal (DNO number)Return number is avgsal emp.sal%type; --Returns and numbers called Avgsal are the types of Sal fields in the EMP employee
What is a sequence?A sequence is a database object used to generate a unique, contiguous integer. A sequence is typically used to automatically generate a value for a primary key or unique key. Sequences can be in ascending order or in descending
Architecture:Instance: ExampleDatabase: DatabasesRAC: Multi-instance to one databaseSGA: Maximum total (System global Zone) buffersPGA: One of these is also a bufferServer process: Servers processesShared pool: Share value (execution plan for
Collection operationsDesc job_history: Changing the position of historyJob_history: History tableVnion: Duplicate values retain only one remove duplicate value ★Vnion all: Retain all duplicate values without removing duplicate values ★Intersect:
Oracle Table complex Query aggregation functionMax (field value)--max valueMin (field value)--Minimum valuesum (field value)--Seek sumAVG (field value)--averagingCount (field value)--Number of numbersGROUP BY and HAVING clauseGROUP BY: used to group
Before the work encountered a problem, need to find all the sub-nodes under the tree structure, if the program will be repeated query database, the performance has an impact on the online search, you can use Oracle recursive query, examples are as
Establish stored procedures on ORACLE server that can be called by multiple applications, can pass parameters to stored procedures, and can be passed back to stored proceduresTo create a stored procedure syntax:CREATE [OR REPLACE] PROCEDURE
--query for positions that are not duplicatedSelect distinctJob fromEMP;--Search for annual salary, alias, alias not enclosed in single quotation marks.SelectSal* A asNianxin fromEMP Sal;--the specific data is displayed in this form: The employee
ETL in the last one weeks whether in the early morning or at noon job execution process often stuck, resulting in the failure to complete the system engine running, the business impact.By generating the AWR report, it was found that three SQL
Stored Procedure Basic syntaxHttp://www.cnblogs.com/hero4china/articles/base_rule_oracle_procedure.htmlBasic notation for Stored proceduresHttp://www.linuxidc.com/Linux/2013-11/93196.htmA simple example of a stored
NVL () function in OracleHow Oracle's NVL function is usedThe total value of a field is obtained by querying, assuming that the value bit null will give a preset default valueSelect NVL (SUM (T.DWXHL), 1) from Tb_jhde t where zydm=-1Here the Nvl
SQL statements are divided into 3 categories1.ddl:data definition Language, data definition language,The language used to define and manage all objects in the SQL database1.CREATE creation2.ALTER modification3.DROP Delete5.COMMENT comments6.GRANT
Today do not know how, whim, put the machine out of the domain, and then ready to oracle11g control to deal withAt the beginning, did not have any intentions, the Internet casually find a bit of information, and then dry, and then nothing to dry,
ADO Operation Oracle database is basically the same as the original operation of MSSQL. Just use a different namespace. Here are two examples:One. C # Read the table for Oracle database ///ADO Read Table///you need to add a namespace: Using
1. Create userCreate user KD identified by 123456;2. Grant permission to connect to the databaseGrant connect to KD;3, the Scott User's EMP table is authorized to KD can be queriedGrant SELECT on Scott.emp to KD;Grant CREATE table to KD;4. Reclaim
Usage examples:--Select columns for the entire table1. Select* fromEMP;--Select the contents of the specified columnSelectJob fromEMP;SelectEname,sal fromEMP;--Conditional JudgmentSelectSal fromEMPwhereSal= -;--between and methodsSelect*
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