If you accidentally overwrite the previous stored procedure, then flash back and the likelihood of a long, long flashback is smaller. The principle is very simple, the definition of stored procedures is a data dictionary, modify the data dictionary
Copy Code code as follows:
DECLARE
V_table Tabs.table_name%type;
V_sql VARCHAR2 (888);
V_Q number;
CURSOR C1 is
SELECT table_name TN from tabs;
TYPE c is REF CURSOR;
C2 C;
BEGIN
Dbms_output. Put_Line (' Table name of empty datasheet: ')
1, Oracle users add
Copy Code code as follows:
Create user Lisi identified by Lisi;
Note: Create user is creating database users, followed by user name, identified by is set user password
2, the "connection" database
When a section is used more than once in a query, a public temporary table can be created with an Oracle with statement. Because the subquery avoids repeated parsing in the memory temp table, the execution efficiency improves a lot. Temporary tables
1. Left OUTER JOIN: External Association
SELECT E.last_name, e.department_id, D.department_name
From Employees E
Left OUTER JOIN Departments D
On (e.department_id = d.department_id);
Equivalent to
SELECT E.last_name, e.department_id,
To generalize Oracle's basics, to sum up, Oracle is made up of instances and databases. The structure is as follows:
An Oracle database consists of an instance, a database:
* The database consists of data files (including Oracle data, index,
The following is an operation to connect to a database using a connection pool under a Tomcat server
One: Modify the Web.xml file:
Copy Code code as follows:
project
index.html
index.htm
index.jsp
default.html
default.htm
1. Various procedures for application-level shutdown.
2. Stop Oralce Listening process:
$lsnrctl stop
3. Under the exclusive system user, back up the control file:
Sql>alter database backup controlfile to trace;
4. Under exclusive system users,
1.Oracle Server-side Character set query
Copy Code code as follows:
Select Userenv (' language ') from dual;
Server Character Set modification :
To start the database in restricted mode to do character set changes:
After installing oracle11g, you want to open your own SQL Plus to learn, and then follow the prompts to use the SYS user to connect to the database, you can lose several times prompted an error:
Error:the account is locked
There may be several
The original statement is this:
Select SUM (sl0000) from XSTFXPS2 where
Dhao00 in (
Select dhao00 from Xstfxps1 where Trunc (ywrq00) =trunc (sysdate)
and khdm00= ' 500000003913 ');
Time used: 00:02:49.04
Execution Plan
-------------------------
1 The syntax of the SQL statement is verified.
syntax checking for SQL
2 the data dictionary is searched to verify table and column definitions.
Check table name and field name from data dictionary
3 the data dictionary is searched to verify
Write a batch file first, give an example.
Copy Code code as follows:
Set rq=%date:~0,10%
Exp System/system password @ Local Service name file=d:\backup\bak%rq% Full=yes log=d:\backup\bak%rq% buffer=65536
C:\progra~1\winrar\rar.exe A-DF
Copy Code code as follows:
If you have multiple tables in the-->FROM clause, select the table with the least number of record bars as the underlying table
--> parsing WHERE clause is a bottom-up filter condition must be in order
The role switching between Data guard master and subordinate libraries is divided into the following two kinds:1) SwitchoverSwithchover are usually artificial and planned for role swaps, such as upgrades. It is usually lossless, that is, there will
How do you get the maximum date for Oracle in your development application? This article will provide such a method of obtaining a friend that needs to be referenced under
SQL code
Copy Code code as follows:
--Created on 2010/06/08 by NAN
If one of the data in the table is deleted in Oracle, it can also be rolled back by a rollback operation (rollback) If you want to clear a
Table, but do not want to be able to rollback operations, you can immediately release resources, then need to
Sql:charindex (' String ', field) >0 charindex (' Administrator ', Muserid) >0
Oracle:instr (field, ' String ', 1,1) >0 InStr (Muserid, ' Administrator ', 1,1) >0
In the project to use the Oracle INSTR this function, by the way carefully learn
1. Log on to the server create Rman automatically delete archive log scripts two days ago
[oracle@108 ~]$ cat >>del_ora_log.rman Crosscheck Archivelog All;
Delete noprompt expired archivelog all;
Delete noprompt force archivelog until time ' sysdate-
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