Step:
1. Choose File> reverse engineer> database...
2. In the pop-up window, select the relational database type. Here, use Oracle9i and click "OK.
3. Select using a data source in the new window and click the button at the end to select the data
Recently, derivative work is required to import data from several tables to one table, where data may be duplicated. Therefore, data comparison is required before import.
Method 1: I used group by having count (*)> 1 to extract the duplicate data
The new oracle11g database was used yesterday.
It was a relatively simple problem. I should have done something about configuring TNS and modifying connectstring.
Who knows? A user name and password error is reported as soon as the database is
1. Loop
DeclareX number: = 0;BeginX: = 0;LoopX: = x + 1;/* If x> = 10 thenExit;End if ;*/Exit when x> 10; -- this sentence serves the same purpose as the above if statement, but it is so concise.Dbms_output.put_line ('Internal: x =' | X );End loop;
before connecting to the database server, first, you must enable two Oracle-related services in the control panel-Administrative Tools-service of Windows: oracleorahome92tnslistener (listener service) and oracleservicechstone (instance service ), if
(Length (TRIM (cbkssj) is nullThis statement should only be applicable to Oracle's strange situations. Should it be determined that length is equal to null ?! In addition to this, a strong SQL syntax is provided, which contains a lot of or and.
Declare CNT number;
Begin--- Query whether the table to be created existsSelect count (*) into CNT from user_tables where table_name = 'entry _ modifystatus ';--- Delete the table if it exists.If CNT> 0 thenDbms_output.put_line ('table exists not
Syntax Rules:Create [or replace] trigger [mode.] trigger name
Before | after insert | Delete | (update of column name)
On Table Name
[For each row]
When Condition
PL/SQL Block
Note:
The meaning of for each row is that in a statement that operates a
1. Connection sequence in the WHERE clause: Oracle uses the bottom-up sequence to parse the WHERE clause. According to this principle, the join between tables must be written before other where conditions, and those conditions that can filter out
Working overtime today, we found that all oracle services on the database server were lost-that is, there were no oracle services in the Service Manager, such as OracleOraDb10g_home1TNSListener and OracleServiceORCL.Solution:1. Export all oracle
I. Oracle Data Dictionary
A data dictionary is a place where Oracle stores database information. It is used to describe data. For example, the Creator information, creation time information, tablespace information, and user access permission
Analysis Function over and Window Function
I. analysis function overOracle provides analysis functions starting from 8.1.6. analysis functions are used to calculate a group-based aggregate value. What is different from aggregation
We believe that everyone is familiar with Membership. A set of user management tools released in the net 2.0 era. The problem is that Microsoft's official Membership is only made for SqlServer. If your system needs to use Mysql or Oracle, it will
In the new year, I summarized some of the books I have read before. Many of them are worth reading and reading, and many are also sleepy after several pages.
Below are some books related to databases that I think are good at. I can't wait to share
--- 1. Normal equal connections
Select E. last_name, D. department_name
From employees e, departments d
Where E. department_id = D. department_id;
--- 2 left Outer JoinSelect E. last_name, E. department_id, D. department_nameFrom employees eLeft
Create or replace trigger testTAFTER INSERT OR UPDATE OR DELETE ONFor each rowDeclare-- Local variables hereBeginIF INSERTING THENInsert into B (a, B) VALUES (: NEW. a,: NEW. B );ELSIF DELETING THENDelete from B WHERE a =: OLD.;ELSEUPDATE B SET B =:
46.Connect multiple scans
If you compare a column with a limited set of values, the Optimizer may perform multiple scans and merge the results.
Example:
SELECT *
FROM LODGING
Where manager in ('bill Gates', 'Ken muller ');
The Optimizer may
1.Select the appropriate ORACLEOptimizer
There are three optimizer types in ORACLE:
A. RULE (RULE-based) B. COST (COST-based) c. CHOOSE (selectivity)
Set the default optimizer. various declarations of the OPTIMIZER_MODE parameter in the ora
The ORACLE Database Log File $ ORACLE_BASE/admin/orasid/bdump/alert_orasid.log records the conversion of logs, Database startup and shutdown, database structure change, rollback segment modification, deadlock, internal errors, and other
One type:
Sub test ()''Test macro'
Dim cn As ADODB. ConnectionDim rs As ADODB. RecordsetSet cn = New ADODB. ConnectionCn. Open "Provider = OraOLEDB. Oracle.1; PassWord = XXXX; Persist Security Info = True; User ID = XXXX; Data Source = XXXX;
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