. Table data replication between different users
For two users A and B in a database, if you need to copy the old data in Table A to the new data in Table B, use a user with sufficient permissions to log on to sqlplus:
Insert into B. New (select *
The Null Value in Oracle does not mean anything. Is not null.
For example, in table 1, there is a nub_flag of the number (1) type. Some of the values are already 1, and others are all empty. You want to update other values to 0.
Write a statement
Fuzzy queries in Oracle rely on the like operator.
Now let's take a look at some specific problems in the use of the like operator.
%: 0 or multiple characters
_ (Underline): represents a character
For example:
(1)
Select ename from
Basic PL/SQL
PL/SQL statement Block
Set
Serveroutput
On
Size
10000 -- set the buffer
Declare
X
Varchar2
(
10
);
Begin
X:
=
'
This is
'
;Dbms_output.put_line (
'
The value of X is:
'
|
X );
End
;
First
Code Paste it here and explain it later, for fear of forgetting :)
If any expert finds an error or is inappropriate, please point it out immediately. Thank you.
Declare
Type name_list
Is
Table
Of
Varchar2
(
40
1. Calculate the size of the redo Block
Lgwr writes redo data to the disk in blocks. The redo block size is Oracle.
Source code Fixed in, related to the operating system.
Generally, the operating system is 512 bytes, such as Solaris, Aix,
In fact, uploading images and other BLOB fields stored in Oracle is not very good, but it is also possible to do so,
For example, struts1 + hibernate uploads a file, a typical exampleCodeAs follows:
Dworkstationdao d = new dworkstationdao ();
For example, when creating a news navigation bar, it is often like this:
Home> A> A1> A2
In this way, we need to display the names of the fathers of A2, for example, in the classification of A2. in Oracle, it is very easy to do, mainly using
1. Show operation timeSet timing on;
2 nvl (Comm, 0). If comm is empty, 0 is displayed; otherwise, comm is used.3 when groupy, having, and order by exist at the same time, group by must appear first, and thenIs having, and order4 select * from
In Oracle, always view process:
View the maximum number of processes in Oracle:SQL> select count (*) from V $ session # Number of connectionsSQL> select count (*) from V $ session where status = 'active' # number of concurrent connectionsSQL> show
Previously, I also introduced some basic Oracle content, such as SQL * Plus,
For a large database such as Oracle, its own operation and maintenance are also very difficult,
Therefore, there are more than N data dictionaries in Oracle. data
First, use the operating system command to find the process ID with high CPU utilization
1. View All SQL statements currently executed by the database and the corresponding process ID
Column Machine format A16;Column program format A16;SelectP.
[Problem]:
1. Oracle control files and online redo logs do not implement multi-path mirroring, resulting in reduced database reliability.
2. data files are not adjusted based on the I/O load, resulting in Io imbalance between disks and high I/O
I used the Oracle query statement today and wrote down the question about Oracle's left-right link.
My query statement is like this.
Select v. *, R. * from (select service_id, sum (amount) from v_order_relation_detail group by service_id) V,
1. Column and column conversion with fixed columnsFor exampleStudent subject grade---------------------------Student1 language 80Student1 mathematics 70Student1 English 60Student2 language 90Student2 mathematics 80Student2 100
Environment: VM + redhat9 + oracle9.2
1. Modify/etc/oratab content
Oracle_sid:/u01/APP/Oracle/product/10.2.0/db_1: N is changed to the following content:# Add below content# $ Oracle_sid: $ ORACLE_HOME:
Export directlyExp system/manager file = exp_full.dmp log = exp_full.log compress = N full = y direct = y recordlength = 65535View exported file contentIMP username/password show = y full = y file = A. dmp
Export option: compress = n to ensure
Recently, I have to deal with transactions. I have sorted out the following common Oracle transaction methods:CommitUsage :(The transaction is completed, the data is modified successfully, and is open to other users.)For example:
Update
Plan
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