PHP Program Access to the database, you can use stored procedures, some people think that the use of stored procedures to facilitate maintenanceHowever, in this case, I think that using stored procedures means that DBAs and developers have to work
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: ')
Copy Code code as follows:
CREATE OR REPLACE FUNCTION fn_no_make (V_prefix VARCHAR2,
V_table_name VARCHAR2,
V_number_col VARCHAR2)
/*
* V_prefix: Code prefix two bits
* V_table_name: Table name encoded
* V_number_col: Name of the column
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
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,
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,
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
Copy Code code as follows:
SELECT
Height,/*height of the b-tree*/
blocks,/* blocks in the index segment * *
Name,/*index name */
Lf_rows,/* Number of leaf rows in the index * *
Lf_blks,/* Number of the leaf blocks in the index * *
This is written for Oracle, can be used on different computers, because it will automatically read the current computer environment variables, so as to obtain the Oracle installation path, the only point is that the program is running in the process
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
Oracle offers a number of ways to reduce the time spent parsing Oracle SQL expressions, which can drag down the system's performance when performing complex queries with a large number of execution plans. Now let's take a brief look at several 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