The concept of Grang:A cursor is a memory workspace of SQL that is defined by the system or user as a variable. The role of a cursor is to temporarily store blocks of data that are extracted from the database. In some cases, the data needs to be
1 Trigger
The SQL statement is as follows:
Create or Replace Trigger Trigger_name
Before insert on Your_sid.tablename
For each row
Begin
Declare
I number;
Cursor cur is select MAX (id) from Your_sid.tablename;
BEGIN
Open cur;
FETCH cur into i;
Implement search paging query in Oracle (reprint http://bbs.hidotnet.com/12148/ShowPost.aspx)
One of the problems developers often encounter when building a custom search engine is to implement some sort of paging functionality, that is, to allow a
Background:
String sql = "SELECT * from Atm_user where username=?" and password=? ";
A very common SQL statement where username and password are char (20) and char (32) in Oracle if the query in MySQL is not a problem, the key is that the query in
1, SET autotrace parameters
SET autotrace off----------------does not generate Autotrace reports, which is the default modeSET autotrace on EXPLAIN------Autotrace displays only the optimizer execution path reportSET autotrace on STATISTICS--only
Oracle Rank () over, Dense_rank (), row_number () difference
Suppose there is a student table student, the student's table has the name, the score, the course number, and now I need to sort the students ' grades according to the course.
SELECT *
The OpenSUSE system has its own openjdk, but I would like to install it with the JDK provided by Oracle.
Method:
Download JDK:jdk-8u65-linux-x64.rpm
Install JDK: Unzip the downloaded JDK, place it where you need it: Vi/etc/profile, add the
Set to archive mode
1 sql> archive log list; #查看是不是归档方式 2 sql> alter system set LOG_ARCHIVE_START=TRUE Scope=spfile; #启用主动归档 sql> alter system set log_archive_dest= ' Location=/oracle/ora9/oradata/arch ' scope=spfile; #设置归档路径 sql> alter system
Solution to low swap space when installing Oracle on Linux
There are two ways to increase swap space: Strictly speaking, there is only one way to add swap after the system is installed, and that is the second method of this article, as the first
A Oracle's Cursors Concept:Cursors: Used to query a database, get a pointer to a collection of records (the result set), which allows the developer to access a row of result sets at a time and manipulate each result set.
Two Oracle's Cursors
When you use a different version of the EXP tool for database export in an Oracle database, you sometimes experience errors similar to the following:Exp-00003:no storage definition found for segment (11, 307)Exp-00003:no storage definition found for
After Oracle 10g installation is complete, its directory structure differs greatly from that of oracle9i. The main structure of the Oracle Database 10g and Oracle9i file directories is shown in the following illustration. The ora92 in the Oracle9i
Recently, a machine equipped with Rhel5.3 40G memory has an Oracle database, the database of the SGA set to 20G, when running a business, a peak of business, find swap frequent swap, CPU 100%,load is very high, basically reflected in insufficient
Oracle subroutine parameter patterns are mainly in,out,nocopy,in and out can be combined, out and nocopy can also be used in combination.
In is mainly used for incoming parameters, can be variables, constants, expressions, within the subroutine can
Oracle Deadlock Query and processing
First, the phenomenon of database deadlockProgram in the process of execution, click OK or save the button, the program is not responding, there is no error.Second, the principle of deadlockWhen you perform an
Source: http://blog.csdn.net/zhrzhl/article/details/24020319
1. ORACLE SID View Settings
View SID, User name
$ env|grep SID, select * from V$instance, select Instance_name,host_name from V$instance;
View all users and user status of the database:Sql>
One. Sql*plus Client Tools
1. Download, URL: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html (click to open link)
2. Select the corresponding version of the operating system of the client, the window system as an
Sql> CREATE TABLE T_long (ID number, long_col LONG); Table has been created. Sql> INSERT into T_long VALUES (1, Lpad (1, 32767, ' HELLO world! ')); 1 lines have been created. Sql> COMMIT; Submit completed. Sql> SELECT * from T_long WHERE
How Oracle implements a one-stop operation for creating databases, backing up databases, and importing data exportsThe management of data objects and data in Oracle is undoubtedly managed using PL/SQL developer, which also provides us with a lot of
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