We may have this situation, a table originally poorly designed, resulting in the table data data duplication, then, how to delete the duplicate data.Duplicate data may have two scenarios, the first one being only some of the fields in the table, and
--Create a test table name
CREATE TABLE job_table (run_date date);
--Create a stored procedure
Create or replace procedure Job_proc as
Begin
Insert into job_table (run_date) values (sysdate);
End
--Create a job and specify one minute
There is a table named TB with the field segment named name and data type nchar (20).
1, assuming that the field data is empty, no matter what type of field to change, you can directly execute:
ALTER TABLE TB Modify (name Nvarchar2 (20));
2,
This experiment discusses the great role of bitmap indexing in ad hoc queries.
Ad hoc query (Multidimensional report query: SELECT * from T where col1=xxx and col2=xxx and col3=xxx ...)
1. The table has a gender, age range, place of birth and other
1. See which stored procedure is lockedCheck V$db_object_cache ViewSELECT * from V$db_object_cache where owner= ' the owning user ' and locks!= ' 0 '
2. See which SID, through the SID, can tell which sessionCheck v$access ViewSELECT * from v$access
First, row to column
In some application scenarios, such as student achievement. The students ' scores in all subjects are saved to a table, and when we need to display the results of each subject in the form of a list, we need to use the row-column.
First of all, we need to rearrange the relevant concepts, functions in an Oracle database are invoked only by others, stored procedures can be executed separately, and a stored procedure can be invoked, and the package's action package can place any
How Oracle Locking Works
When a Lock isn't a lock!
In the last installment of this series "Thing your Probably didn ' t Know about Oracle" you learned how Oracle locks The rows of a table. This is what your learned in a nutshell:
(1) When a
The optimizer for Pl/sql statement execution of an Oracle database has a cost-based optimizer (CBO) and a rule-based optimizer (RBO).
The Rbo optimization method relies on a strict set of grammatical rules, and the statement written by rules,
The Oracle move Redo log method is simple, and here's a quick way to explain the Oracle Mobile redo log file, and if you're interested in Oracle Mobile redo logs, look.
$ Sqlplus '/as sysdba '
#关闭数据库.
sql> shutdown
Such as:
11 is in front of 9, because it is sorted according to string (so 1 is definitely ahead of 9), not sorted by the actual size of the number.
What to do now.
Use Orale SQL keyword: cast, convert varchar2 to int, but only if the field is
--TableCREATE TABLE test (names VARCHAR2 (12),Dates date,Num INT,Dou double);--ViewCreate or replace view vi_test asSELECT * from Test;
--SynonymsCreate or replace synonym AAFor DBUSRCARD001.AA;
--Stored proceduresCreate or replace produce DD (v_id
I now want to use a field to save a long string (in the 4000,VARCHAR2 is not satisfied), think of long, but the Times with JDBC SQL incorrect, please expert advice, quite urgent ....
Do a search with Google ... e.g.Sample demonstrating the usage of
This is the most recently written batch of an Oracle database automatic backup, which has been tested for normal operation and is recorded as follows. Includes two parts, logical backup and cold backup, if there is not complete, but also to see the
1 Download virtual machine software: Enter page HTTPS://WWW.VIRTUALBOX.ORG/WIKI/DOWNLOADS,MAC system select VirtualBox for OS X hosts. 2 Install the virtual machine software can refer to: http://bbs.feng.com/read-htm-tid-5173608.html 3 to create a
SELECT statements in Oracle can use the start with ... Connect by prior clause implements recursive query, connect by is used in structured query, its basic syntax is:
SELECT * FROM tablename start with Cond1
Connect by Cond2
where Cond3;
In short,
1. Change the database character set to GBK
SHUTDOWN IMMEDIATE;
STARTUP MOUNT EXCLUSIVE;
ALTER systemenable restricted session;
ALTER Systemset job_queue_processes=0;
ALTER Systemset aq_tm_processes=0;
ALTER Databaseopen;
ALTER DATABASE National
first, the partition table
Several categories of partitioned tables:1, Range (range) partitionIs the application of a wide range of table partitioning method, which is the range of the value of the column as a partitioning of the conditions, 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service