1. It is best not to correlate more than 3 table examples:
Salary Table A provident Fund form b Medicare watch C
If a in the Payroll table has employee number 12365, and no 12365 data in table B
If the association condition is a. Work number =b. The work number (+) will go wrong, and the associated
The missing work number is 12965 because the B table does not have this record
It's best to put the data together with union all.
2, the best use of the table field grouping, the use of English encoding data, if the use of Chinese data prone to errors such as grouping with names, error prone, because there may be the same name
3, Multi-table Association for the correctness of the data should be added outside the connection, if the association of two fields, you need to be out of the association, otherwise it will be less recorded.
When multiple tables are associated, because each table data is inconsistent, you must select a table as the standard and use an outer join.
4, when the view level is very many, the speed is relatively slow, you can use the data in the view in the middle table
5, in order to optimize SQL statements, use less fuzzy query.
6 when it comes to calculating sums of numeric data such as money, it is necessary to make a non-null judgment, otherwise it is prone to error.
7. The function of a sequence can generate a table's primary key by defining a sequence.
8. The data source of the Update subquery is preferably a table rather than a view, because the table is much faster than the view.
9, when the trigger is written, when the surface trigger is not allowed,
The reason is that table-level triggers do not allow the use of new old.
Some points to note in Oracle development