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
Key: Oracle for update row lockThe syntax of the Select... for update statement is as follows:Select... for update [of column_list] [Wait n | Nowait] [Skip locked];Where:The of clause is used to specify the columns to be updated, that is, to lock
Constraints:It is used to ensure that database data meets specific business rules.Restrictions in Oracle include:Not NULL:Unique:Primary Key: PKForeign key: FKCheck:A. Not NULL: non-null constraint:If not null is defined in a column, data must be
Three default accounts:
For Oracle 9:Sys change_on_install Network Administrator [as sysdba]System manage local administratorScott tiger is locked by default and can be used only after being unlocked.
For Oracle 10:
Sys and system do not have a
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 download the installation package... Address: This http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
Of course, the default installation package does not support Windows 7 and visata. So we must change the following
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
-- Do not mix up the sequence...
-- 1. Create a tablespace --Create tablespace sfwebloggingdatafile 'C: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ sfweb. DBF 'size 32 m autoextend on next 32 m maxsize 2048 mextent management local; -- 2. create
Oracle deletes a column of duplicate rows in the table
Table Name: T4
Create Table Test. T4(ID number (10 ),Firstname varchar2 (50 char ),Lastname varchar2 (50 char))
The ID is the primary key, and all rows with duplicate IDs are deleted (no matter
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
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
OracleHow to display all current user tables
Show all tables of a user (for example, Scott, uppercase is required)
Select table_name from all_tables where owner = 'Scott ';
Show all current user tables
Select * From user_tables
Display All Tables of
1. Download
Go to http://www.oracle.com/policy/software/tech/oci/instantclient/index.htmlto download the installation program of the latest version.
2. decompress the package to the local device. For example, unzip the package to D: \
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