I started to write a trigger to determine the value of the MASTER_SESS_ID FIELD IN THE SSO_SP_LIST table andWhether the record with the same value as the MASTER_SESS_ID field of the deleted record in the table is empty. I select the MASTER_SESS_ID
SQL advanced application1. Use of Embedded SQLSQL is a non-procedural, set-oriented data manipulation language. Most of its statements are independent of context conditions. In transaction processing, process control is often required, that is, the
1. Syntax
In Oracle, you can create two types of temporary tables:
1) Session-specific temporary tables
Create global temporary ()
On commit preserve rows;
2)TransactionsSpecial temporary table
Create global temporary ()
On commit delete
Instance:Create a USERINFO database table:
Of course you can write it like this:Drop table USERINFOCreate table USERINFO(EnglishName varchar (30 ),ChineseName varchar (30 ),Sex varchar (10 ),Age int,BirthPlace varchar (100 ),BirthDate date default
How can we determine whether a table exists before creating a table? Because table does not support replace. The following SQL can help you.
Determine whether the table exists before create. For example, if yes, drop the table. You can also define
Stored Procedure Overview
The commonly used operating database language SQL statements must be compiled and then executed before execution. The Stored Procedure (Stored Procedure) is a set of SQL statements for specific functions, after compilation,
Create split and splitstr functions in Oracle, splitsplitstr
It is recommended that SQL statements be created in sequence.
/*************************************** Name: split * author: sean zhang. * date: 2012-09-03. * function: returns the table
-- ===================================================== ==========
-- Use an external table to manage Oracle alarm logs (ALAERT _ $ SID. LOG)
-- ===================================================== ==========
A part of Oracle alarm logs that DBAs
Using the oracle Stored Procedure generation tree encoding, the oracle Stored ProcedureRequirements for generating tree encoding using oracle stored procedures
Field
Description
Remarks
ID
Primary Key, 32-bit UUID
The instead of trigger can be used to insert, update, delete, and merge tables in a view composed of more than one table. Instead of can also be used to create partition tables.
Syntax for creating an instead of trigger:
1 Create [or replace]
1. Basic Structure
Create or replace procedure
(
Parameter 1 in number,
Parameter 2 in number
) Is
Variable 1 integer: = 0;
Variable 2 date;
Begin
End stored procedure name
2. Select into statementSave the result of the SELECT query to a variable.
According to the customer's needs, we have added a statistical table to collect statistics and generate statistical data. We need to dynamically Execute SQL statements based on a basic table. the execute immediate command is used to dynamically
Oracle db_file_multiblock_read_count is an important global parameter in Oracle, which can affect the system level and sessioin level. It is mainly used to minimize the number of data blocks that Oracle can read at a time in order during table scan.
Oracle Temporary Tables (Temporary Oracle table)
1. Create a temporary table syntax
A. on commit delete rows defines how to create A transaction-level temporary table
Create global temporary table TABLE_NAME
----- (COUMNS ...)
----- As select...
Online Slave reports 1062 Cases
Recently, the online Slave often reported a 1062 error. It broke the ground. Fortunately, Slave has not been used in the business for the time being. That is to say, there is no read/write splitting, so Slave has
/* Obtain the pinyin corresponding to the name of the Oracle function */
Create or replace function F_GET_PY (V_XM varchar) RETURN VARCHAR2 ISS_py varchar2 (100 );Z_hz varchar2 (2 );Z_py varchar2 (10 );I number (3 );I _jls number (5 );BEGINS_py: = ''
PL/SQL is a procedural programming language for Oracle database operations. It can be executed in SQL * plus or embedded in JAVA or C ++. The basic components are as follows:
DECLARE
...
BEGIN
...
EXCEPTION
...
END
It can be used to encapsulate
The commonly used operating database language SQL statements must be compiled and then executed before execution. The Stored Procedure (StoredProcedure) is a set of SQL statements for specific functions, compiled and stored in the database. You can
PHP calls the MySQL stored procedure and returns the value. PHP calls the MySQL stored procedure and returns the value. This document describes how to call and execute the mysql stored procedure in php and then return the value returned by the
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.