the subquery, if the subquery is empty, then nothing will be inserted.4, the climax is coming--after removing the where in the subquery, that is, the select condition is definitely a value, it actually inserts all the records in Table E. Ah, fortunately the test library, the amount of data is small, but also executed 5s. Well, that's unusual. Delete all! Depending on the result set insert or need to be cautious ah, otherwise how much garbage data in practice.5, return to the original intention.
Tags: oracle plsql indexed viewA view and index of the start of PL/SQL basics PL/sql: Process language (Procedure Language) and structured language (structured Query Language)The combination of the programming language, is theSQLextensions that support multiple data types, s
exception (this is the choice of custom exceptions in most cases); if it is TRUE, the newly thrown exceptions are stored at the top of the exception stack (Other exceptions have occurred ).3) Oracle pre-defined PL/SQL exceptions
Exception name
ORACODE
SQLCODE
Trigger time
LOGIN_DENIED
01017
-1017
Invalid user name or password
First install Oracle Enterprise Edition or client lite. After that, you need to modify your Tnsnames.ora file to increase the database.My Oracle instance is ORACLE1 and placed in the D:\oracle\ directory. My IP address is 192.168.1.102.Modify the following: add: DEMO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.102) (PORT = 1521)) (Connect_data
Oracle | PL/SQL sets auto-increment of primary keys. Oracle does not set auto-increment of primary keys. You need to set the sequence and trigger to auto-increment of primary keys. Example: create a table menu: [SQL] create table menu (menuId number (10) not null primary key
1. Download PL/SQL Dev
2. Download the simplified Oracle client
3. Install PL/SQL Dev and the Chinese package
4. decompress the Oracle thin client. For example, extract the Directory D: \ oracle10g.
5. Configure the
, sum2 (deptno)
4, systimestamp
5 FROM emp
6 group by deptno;
Deptno sum (SAL) SUM2 (DEPTNO) incluimestamp
------------------------------------------------------------------------------------------------------------
30 9400 9406 24-JUN-11 08.31.19.722000 PM +
20 10875 10880 24-JUN-11 08.31.19.722000 PM +
10 8750 8753 24-JUN-11 08.31.19.722000 PM +
SQL>
We found that the results of sum (sal) and sum2 (deptno) are inconsistent.
When we ap
dual;F1 ()----------59788330Used time: 00:00:07.09 -can see the data change, even if not using relies_on, the result set is also correct. Sql> Select COUNT (*)From Test1, test2where Test1.object_type = Test2.object_typeand Test1.object_type in (' Table subpartition ', ' VIEW ', ' INDEX ', ' table ');COUNT (*)----------59788330Time used: 00:00:03.56 sql> Create or Replace function F2return numberResult_cac
Four simple guidelines to improve the number and quality of Pl/sql code
I've been writing Pl/sql code since 1990. That means I've written tens of thousands of of lines of software code, but I'm sure most of the code is very clumsy and difficult to maintain.
Luckily, I find it's not too late to find and follow a new w
Basic knowledge of oracle Database PL/SQL 1) Overview: the programming language formed by oracle procedural expansion in the standard SQL language is a unique feature of oracle, languages that support application development. Www.
The case of PL/SQL programming specification
As in SQL, Pl/sql is case-insensitive. Its general guidelines are as follows:
Keywords (BEGIN, EXCEPTION, end, IF THEN else,loop, End LOOP), data type (VARCHAR2, number), internal functions (least, SUBSTR), and user-defined subr
PL/SQL single-line functions and group functionsA function is a program that has 0 or more parameters and has a return value. Oracle has built a series of functions in SQL, which can be called SQL or PL/
I found a
This book starts with some of the most basic knowledge and works with easy-to-understand examples to help you get started with simple knowledge points at and then go deeper step by step, each step will be used in concert with the example to explain to you. One small step at a time is the foundation of the next step, until the usage is relatively advanced.
Oracle10g PL/SQL programming tutorial b
Oracle, paging, and stored procedure are combined to create a paging stored procedure using PL/SQL.
1. Declare a referenced cursor
[SQL] view plaincopyprint? 01. create or replace package cur_ref_type02. as -- is or as can be used03. type cur_ref is ref cursor;04. end;Create or replace package cur_ref_typeAs -- is or a
After Oracle 10 Gb is installed, a table is created to write Chinese data. It is found that the PL/SQL developer tool cannot display Chinese normally.
To display Chinese characters properly, the server must be consistent with the client encoding. Therefore, check.
1. Check the server code:
Execute SQL Syntax:
Selec
Application Server 1.0.2.2.2Oracle Oracle9i Application Server 1.0.2.2Oracle Oracle9i Application Server 1.0.2.1sOracle Oracle9i Application Server 1.0.2Oracle HTTP Server 9.2.0Oracle HTTP Server 9.1Oracle HTTP Server 9.0.3.1Oracle HTTP Server 9.0.2.3Oracle HTTP Server 9.0.2.3Oracle HTTP Server 9.0.2Oracle HTTP Server 9.0.1Oracle HTTP Server 8.1.7Oracle HTTP Server 1.0.2.2 Roll up 2Oracle HTTP Server 1.0.2.2Oracle HTTP Server 1.0.2.1Oracle HTTP Server 1.0.2.0Description:------------------------
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.