----TRUNCATE TABLE
TRUNCATE table deletes all the data in the table, the structure of the table does not change, and the data cannot be rolled back. ----Sequence
SEQUENCE: Generate a number, automatically generate a primary key, such as
First, installation oracle10g (hereinafter refers to oracle10g)
Most of the time Oracle installation is a headache, confusedly installed, the results can not be used, and then unloaded load loaded to install to feel the effect is getting worse, this
Recently, in the forum, we often see someone using the WITH table as statement, generally building a temporary table for testing, after studying the use of this statement I understand the following benefits:
1 without the actual construction of the
The lag and lead functions can fetch the first n rows of data (lag) and the latter n rows (leads) of the same field in the same query. This type of field can be implemented using table joins to the same table, although using lag and lead functions
It's okay, Lao-Lao It 2016-12-04 00:02
Introduction: Oracle, in addition to the EXP command can be a general entire library, the entire user export, but also by increasing the relevant parameter conditions to achieve partial library table or data
Turn from: http://www.jb51.net/article/53576.htm
The actual examples are as follows:
Update Sys_dictionary_bak Set display_name = Trim (display_name)where Table_name= ' T_guardian 'and Column_name= ' Zy ';
Extended:
such as trim (' character 1 '
InStr () returns the position of the string to be intercepted in the source string
Grammar:InStr (Sourcestring,deststring,startposition,appearposition)
Parameter description:
Sourcestring: The source string to find in this string.
Deststring: The
High-level line on Oracle
High water Mark's name is a high-level line, usually relative to a table, when a table has data inserted continuously, high water mark value is increasing, the select query that scans the whole table is to water mark as
After installing Oracle software, you can useUser name SysPassword: password when creating an Oracle instanceServer type: DBAORCL the default naming when installing softwareYou can go to the server
Create a new user name by using the following
This article mainly introduces the use of cursors and several cyclic methods, including while and for as a condition for judging the loop, the loop body is used ... End LOOP. As a condition of the exit cycle there is an exit when conditions,
Author: The source of Xiaoxiang: http://www.cnblogs.com/kerrycode/
------------------------------------------type conversion function------------------------------------------------Automatic type conversion, ORACLE can automatically according to
(i) Paging implementation and performance
Oracle Paging query statements can basically be applied in the format given in this article.
Paging Query format:
SELECT * FROM(SELECT a.*, RowNum RNFrom (SELECT * from table_name) AWHERE RowNum )WHERE RN >=
Set operator precedence is the same as "="
Union: joint operation (combined with set, going heavy)
Query number 7833 current wages, positions and historical wages, jobs
SELECT sal,job from EMP WHERE empno=7839
UNION
SELECT sal,job from
Parameter control of an audit functionThe value of the Audit_trail parameter can be set to the following1. None: Not open2. DB: Open Audit function3. OS: Audit records are written to an operating system file.4. TRUE: Same as parameter db5. FALSE: Do
methods for Oracle to recover deleted tables or table records
article Category: Database
One: Recovery of tables
For accidentally deleted tables, as long as you do not use the Purge permanent deletion option, then recover from the flash back zone
Decode (condition, value 1, translation value 1, value 2, translation value 2,... Value n, translation value n, default value)The meaning of the function is as follows:IF condition = value 1 THENreturn (translation value 1)elsif condition = value 2
--Start
number
CREATE TABLE TEST (--Syntax: number [(P [, S])]--p (precision) represents precision, which is the count of all numbers starting with the first 0 digits to the right and the end of the last non-0 digits on the right-hand side-P can
I. Demand
when will an Oracle cursor be used, and the For, loop, if?
Let's look at one such requirement:
There is a Student class table t_teaching, each student has several courses:
Primary Key ID (self-increasing)
Course Number
Format of PivotSelectFrom (Inner_query)Pivot (aggreate_function for pivot_column in (list of values))Order BY ...;Examples of usage:Select From (Select Month,prd_type_id,amountFrom All_sales)Pivot (sum (amount) for month in (1 as jan,2 as feb,3 as
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