Oracle has two functions: lead and lag, which are the analytic functions used to compute offsets, and the two functions are the same in use.
The Oracle official documentation explains:
The lead is a analytic function. IT provides access to more
1.LISTAGG
SELECT deptno,listagg(ename, ', ')WITHIN GROUP( ORDER by ename) as employeesFrom Scott.emp GROUPby Deptno;Summary of Deptno fields, after which multiple ename are separated by ', '
2.NVL/NVL2
--selectemployee_id,last_name,salary*12* (1+NVL
Sometimes, you can use EXP to export the table space as a transfer tablespace, which is a mechanism for attaching a format data file on a database to another database.
Need to note:For export file dmp, Oracle implements Cross-platform processing,
--① System Change number--Gets the data time insertion time ORA_ROWSCN the SCN that returned the last modification of the row.
Select Scn_to_timestamp (ORA_ROWSCN), tt.* from TT;
--SCN and timestamp convert select TIMESTAMP_TO_SCN (sysdate) from
Start your bbed trip.
By default, bbed is linked to the Rdbms/lib directory. Obviously, it's not the $oracle_home/bin directory we use very often. The linked bbed executable file can be moved to the bin directory, and if you don't move, you can
1 Find an employee with a commission higher than 60% of the salary.
SELECT * from emp WHERE comm > (SAL * 0.6);
2 Find out the details of all the clerks in department 10 and all the managers and departments in 20.
SELECT * from emp WHERE
Issue background: Recently, the company database server is centralized to one machine (252) for the unified management of the databases distributed on each server. For the difference in the last section of the IP address as the name of each machine.
A learning task: Each person has a different number of results, statistics of each person's highest score.
This problem should be relatively simple, in fact, the use of aggregate functions is good.
Select Id,name,max (Score) from Student Group by Id,
1. Stop Service
First lsnrctl stop with command
And then run
Sqlplus/nolog
Sql> Conn/as SYSDBA
sql> shutdown
2, view the instance process and delete
Find $ORACLE _base/-name $ORACLE
The database connection is timed to see if the number of sessions is normal. Set up too many data links to consume the resources of the database
For some hung connections, a manual kill is required
Select Sid,serial#,username,program,status from V$
This article only discusses the most common indexes in Oracle, that is, the B-tree index. The database version covered in this article is oracle8i.I. View the user index in the system tableIn Oracle, the system table is created automatically when
This article is reproduced to http://www.ecdoer.com/post/oracle-dictionary-table-sql.html
Oracle Common Data dictionary table (system table or system view) and query SQL
The data dictionary is where Oracle holds information about the database, and
Introduction to Oracle Table spaceOracle Tablespace is the basic method of data management, all user's object should be stored in the table space , that is, the user has the right to use space, can create user object. Otherwise it is not allowed to
The cursor is performed as follows:Parse resolutionBind bindOpen opensExecute ExecuteFetch callbackClose off
1. Write your own first cursor pl/sqlDeclareCursor c_s is select * from User_tables;BeginOpen c_s; --Open cursorClose c_s;--Closing
How Oracle establishes the self-added primary key 1. Create a table and set a primary key. 2. Create a sequence. 3. Create triggers. Www.2cto.com For example: Suppose you have a table named Tbl_name, the primary key column is tbl_id, and the
Recently read Oracle triggers, try to write a few triggers, but also practical, put in their own database. Now put it out, and simply talk about the definition and use of triggers. The language is plain, absolutely suitable for beginners.
A trigger,
The EXP export tool compresses data backups in a database into a binary system file. Can migrate between different OS
The Imp Import tool imports the binary system files that are formed by exp into the database.
A. Export tool exp
It has three
From http://blog.chinaunix.net/u3/114361/showart_2227746.html (with modifications) Installation steps: The first step: in the terminal input: Xhost +127.0.0.1 The second step: Install the necessary tools: Terminal input: sudo apt-get install
a good memory is better than a bad pen, it is easy to read.
log file can be resize, directly enlarge the size of the log file. 10g is not possible.
the general method on the web is to create a new two temporary log group (Oracle requires at
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