I. Naming rules for table and column names1), must start with a letter2), length cannot exceed 30 characters3), cannot use Oracle's reserved words4), can only use the following characters a-z,a-z,0-9,$, #等Ii. Types of data1), character classChar has
Oracle Database Configuration Monitoring1. Preparation environment: (1) Remote Oracle Service instance or Local service instanceRemote server or Local service side (storage database)(2) Oracle Client (ORACLE–ORACLIENT11G)(3) Pl/sqldeveloper tools2.
1. Introduction to statistical informationThe statistic information mainly is a kind of information which describes the table in the database, the index size, the scale, the data distribution condition and so on. For example, the number of rows in a
1: The company database began to use the MySQL, because the company is doing a confidential project, so in the project log too much when the project has an explosion of the signs AH (30 billion data, seemingly MySQL a little support). Then the team
Default User of Oracle: System,sys,scott;
1: View login username: Show user;2: View data dictionary: dba_users;3: Table Space Overview: Logical storage space for the database; Data dictionary is a database provided by the table, the user to
The principle of selecting a primary key:
Minimum sex
Choose to use a single key as the primary key
Stability
Try selecting a column with fewer values to update as the primary key
1. Creating a data table (CREATE
First, the principle of efficient SQL statement
In where = relational operation
Avoid using functions in relational operations, unless you use a function to make an index
Try not to implicitly convert data types, data types must
Reference material "Oracle in Layman's"Interest + diligence + Persistence + method ≈ SuccessFour rules of DBA survival1. The backup is heavier than everything else;2. Think twice;3.RM is dangerous;4. You have to make the specification;Chapter One:
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
--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
The way to use bulk binding (bulk binding). When looping through SQL statements that execute a bound variable, a large number of context switches occur in PL/SQL and in the engines (switches). With bulk binding, data can be batched from the Plsql
The child node is traced to the root node.SELECT * from persons.dept start with deptid=76 connect by prior Paredeptid=deptidTraverse the child nodes (without the root node) through the root node.SELECT * from persons.dept start with Paredeptid=0
It is best not to do other unrelated actions after deleting data① determining when to delete data② This statement to find the deleted data: SELECT * from table name as of timestamp to_timestamp (' delete point ', ' yyyy-mm-dd hh24:mi:ss ')③ deleted
Grammar:SELECT ... From + table name START With + condition 1CONNECT by PRIOR + conditions 2WHERE + condition 3DescriptionThis method is used to query the data of the tree structure. For example, we have a structure like thisThen build a table
Basic use of SELECT statementsYou can query the required columns, rows, multi-link tables, connection queries.Select E.*, e.sal/ from P_emp EThe select is followed by the result to be displayed, which can be a pseudo-column derived from an operation
Use of Oracle KeywordsUse Insert to add data: INSERT into table name VALUES (add corresponding number); COMMIT;INSERT into P_empVALUES (' TOM2 ', ' clerk ', 7902, Sysdate,, NULL, 30);COMMIT;Try delete Delete a data: Delete table name WHERE condition;
A project requires a view to build a primary key, here is a sampleCREATE or replace VIEW sme_v_a .... (Agentid,agentname,busynum,restnum,resttime,devicenonum,devicenosum,CONSTRAINT agentstatic_pk PRIMARY KEY (agentid) RELY DISABLE
The deadlock is due to the fact that two objects request another resource with one resource,Another resource happens to be holding the two objects, causing the two objects to be unable to complete the operation, and the resources held cannot be
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