1. Kill sessions in batchesSelect Concat ('alter system kill session ''', Concat (SID, ','), serial #),''';')) from v $ session where username = 'Scott'An alter system kill session 'sid, serial 'is generated.
2. Find the process corresponding to
Oracle stored procedure [reprinted]
Http://blog.bossma.cn/archives/2008/01/80
1. Insert data:Insert several data entries into a table
/*
Create a table tb1
contains two fields: col1 and col2
*/
Create Table tb1 (
Use PL/SQL to connect to Oracle without installing the Oracle client
1. Download a software named Instant Client package from the Oracle website. This software does not need to be installed and can be used as long as it is decompressed. :
I am wrong. I am really wrong... accidentally cleared the content of the four basic data tables... Now N more screams...
Contact Se, and Se made a flash back... directly back to the time point before the operation... really handsome... keep the
1. String concatenation
Update tbl_main d set D. area_id = '0' | D. area_id
2. Stored Procedure and cursor
Create or replace procedure prc_inset_dealAsBeginDeclareCursor main_departIsSelect * From main_bak;Temp main_bak % rowtype;BeginOpen
Many people have explained this online, the relevant code is also a lot, the code reference http://hi.baidu.com/bailang3106/item/c80b0fed8a08dbd1ea34c952
Http://baser.blog.51cto.com/4153192/871086
There is only one recipient process:
Create or
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.
Three default accounts:Sys change_on_install Network Administrator [as sysdba] system manage local administrator Scott tiger superuser
Create users, authorize and revoke permissionsLog on to Oracle: sqlplus/As sysdba to start listening: LSNRCTL
Regular Expression
At present, regular expressions have been widely used in many software applications, including * nix (Linux, UNIX, etc.), HP and other operating systems, PHP, C #, Java and other development environments.
Oracle 10g Regular
First create auto-increment index ....
Create sequence archive_seqMinvalue 1
Max value 99999999999999
Start with 1
Increment by 1
Cache 20
Order;
Next... create a trigger for each table
Create or replace trigger archive_tgBefore insert on
Declare
V_ SQL varchar2 (1000 );
Cursor cur is select 'alter table "'| t1.table _ name |'" RENAME to '| Upper (t1.table _ name) as sqlstr
From user_tables T1
Where table_name <> upper (table_name)
And not exists (select 1 from user_tables T2
Http://space.itpub.net/9399028/viewspace-687358
A usage for getting down from the Internet
OracleSent Email
Stored Procedure. You can directly call this stored procedure by sending an email. The parameter meanings are described. The Code is as
Document directory
2. Usage of case when in different positions in the statement
Difference in isnull syntax between SQL Server and Oracle case when else
Isnull () in sqlserver ()Nvl () in Oracle ()Nvl (expr1, expr2) If expr1 is null, the value
Document directory
2. Usage of case when in different positions in the statement
1. The case when expression has two forms:
-- Simple case function case sex when '1' then' male 'when' 2' then' female 'else' other 'ends -- case search function
Technorati label: Oracle
-- Create the directory dir_dump as a sys user and save the file to this directory.SQL> create directory dir_dump as '/data/cmssdb ';Directory created.-- Authorize the read and write permissions of the corresponding
It is very complex to create an Oracle database. Generally, you can use the dbca tool to create an Oracle database. However, in some cases, for example, to run an automated script, you must run the script to create an Oracle database. The following
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