Delete a large table when the space is not released, very slow because of a large amount of system resources, support fallback operation, space is also occupied by this table.
TRUNCATE TABLE name (frees table space when records are deleted from a
The author believes that when creating an index, it is three appropriate to create an appropriate number of indexes on the appropriate table and on the appropriate columns. Although this can be summed up in a sentence to optimize the basic criteria
Get table field:
SELECT * from
user_tab_columns
where table_name= ' user table ' ORDER by
column_name
Get Table Comments:
SELECT * from
user_tab_comments
where table_name= ' user table ' ORDER BY
table_name
Get field Comments:
Function:
1, allow/limit the modification of the table
2, automatically generate derived columns, such as self-added fields
3. Enforce data consistency
4. Provide audit and log records
5, prevent invalid transaction processing
6. Enable Complex
(1) oracleservicesid
Database service, which automatically starts and stops the database. If a database is installed, its default startup type is automatic. The service process is ORACLE.EXE, parameter file initsid.ora, log file SIDALRT.log,
I. Memory dumps
1). Global Area
ALTER session SET EVENTS ' immediate trace name Global_area level n ';
1 contains PGA
2 contains SGA
4 contains UGA
8 contains indrect memory
2). Library CacheALTER session SET EVENTS ' immediate trace name
Duplicate data can be in two cases, the first: only some of the fields in the table, and the second is exactly the same as two rows of records. one, for partial field duplicate data deletion 1. Query for duplicate dataSelect field 1, Field 2, COUNT (
Format:
SELECT column
From table_name
START with Column=value
CONNECT by PRIOR Parent PRIMARY KEY = child foreign key
Select Lpad (', 4* (level-1)) | | Name Name,job,id,super from EMP
Start with super is null
Connect by Prior Id=super
Example:
Raw
In Oracle, there are Rank,dense_rank,row_number, and group ranking partition.
Description
Rank: The rank will appear in parallel with nth name, after which it will skip the vacated position, for example: 1,2,2,4Dense_rank: Ranking will appear in
Meaning explanation:Decode (condition, value 1, return value 1, value 2, return value 2,... Value N, return value N, default value)
The meaning of the function is as follows:
Copy Code code as follows:
IF condition = value 1 THEN
(1) View character set (three is equivalent)
Copy Code code as follows:
SELECT * from v$nls_parameters where parameter= ' Nls_characterset '
SELECT * from nls_database_parameters where parameter= ' Nls_characterset '
SELECT * from
Type
Meaning
Storage description
Note
CHAR
Fixed-length strings
Max length 2000bytes
VARCHAR2
Variable-length strings ,
Max length 4000bytes
Maximum length of the index can be 749
Syntax for adding fields: 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
1. Get database name and date createdSELECT name, created, Log_mode, open_mode from V$database;
2, the Oracle database computer host name, Oracle database instance name and Oracle Database management system version informationSELECT host_name,
First, start data$sqlplus "Sys/pass as SYSDBA"Sql>startup
Second, start the listenerAfter the database is started, if the listener process is not started, the client cannot connect to the database. The Start method for the listener process
Data Guard offers two main services:1 Redo Transport Service: The Primay end of the redo log transmission to one or more standby destinations.2 Redo Application Service: The redo log which is transmitted from the Primay end is applied to the standby
The schematic diagram is as follows:
Control file: A file (the most important file) used to control how data is imported.
Parameter file (optional)
Data files: Flat file where source data is placed
Error files: Putting data that cannot be
Looking at PD, double-click a table, view its preview label, and then find the CREATE statement for a table, as follows:
Copy Code code as follows:
CREATE TABLE Company_info (
company_id NVARCHAR2 (m) not NULL,
area_id NVARCHAR2 (50),
1, in the report page layout corresponding position to add a text box, generally for download
Right-click the Pl/sql Editor to write a hyperlink and add the following:
Copy Code code as follows:
Function B_13formattrigger Return
Meaning explanation:
Decode (condition, value 1, return value 1, value 2, return value 2,... Value N, return value N, default value)
The meaning of the function is as follows:IF condition = value 1 THENreturn (translation value 1)elsif condition =
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