One: use where less to use having;
Second: Check more than two tables, the record less on the right;
Third: Reduce the number of visits to the table;
Four: When there is a subquery, the subquery is placed in the front;
V: try to avoid using the *
first, let's talk about what they have in common: They are essentially exclusive locks on resources that are caused by concurrency (if the database has only one session, it is not locked).
Then focus on the different points:
first of all , their
1. Basic Concepts
Two functions: To complete the constraints of complex business rules that are difficult to complete by database integrity constraints, to monitor various operations of the database, and to implement audit functions.
Triggers are
1. Install the required patch pack for the oracle11g, install the CD-ROM on all, access to the CD's server directory: (preferably through Oracle's official documentation to determine which packages need to be installed)
2. Modify the user
Sometimes it is not clear that all allowable values for some parameters can be obtained from the following two methods
1. Directly input the wrong value, let the error to hint
Copy Code code as follows:
Sql> alter system set
When you write a stored procedure, you use the following SQL statement
Copy Code code as follows:
SELECT MAX (re_date) into v_re_date
From t_recording
WHERE ID = ' 100010010102 '
Logically, the result of a query based on this
After finishing the project yesterday to test a test, said that the paging query does not seem to work, turned to page 4th, after the results of the data are the same.At that time I felt very puzzled, impossible ah, paging components should be good,
1. The origin of the problemWhen the Oracle database field value is less than 1 decimal, processing with the char type loses 0 of the preceding decimal pointFor example, 0.35 becomes. 35
2. Solution: Format digital display with To_char
In this case, if there is duplicate data in the temporary table, whether the primary key field is BUSINESSID, or if a whole row has duplicates, it will report a violation of the unique PRIMARY KEY constraint error.
Method: Group BY XX has count (*)
1, if the database machine does not install console or use console to configure the network service name.
You can log on to the server idle process by using the command Sqlplus Sys/sys as SYSDBA. Look at step fourth.
2, if the network service name
Demand:
Currently contact with the BI system, due to the business system transactions have a lot of, often some executives need to see all the records, but do not want to scroll, want to see all, and then think of the form of string concatenation.
What should you write if you need to use SQL recursive statements in an Oracle database? Here's an example of a SQL recursive statement used in Oracle for your reference.
Example:
Copy Code code as follows:
PID ID
A b
A C
A E
b B1
b
This example describes the core steps of PHP connecting to Oracle databases. Share to everyone for your reference, specific as follows:
1, modify php.ini file, open Extension=php_oci8.dll extension.
2, copy the PHP installation
First you need to install the following installation packages, you can find the following installation package Yum installation in the CD-ROM data source
Yum install perl* freetype libpng* libxm2 libxm2-devel Curl Curl-devel libjpeg*
Manual
1. Install Oracle Client
The prerequisite for connecting to Oracle is to install Oracle Client on the SQL Server server. Oracle client download addresses are as follows:
Copy Code code as follows:
Basic information for user users and 3 columns in the UserInfo table
Package landing judgment;
public class User {
private String name;Private String LoginName;Private String LOGINPSW;Public String GetName ()
This article is an example of how Python connects Oracle databases and shares them for your reference. The specific steps are as follows:
First, download the driver: (cx_oracle)
http://www.python.net/crew/atuining/cx_Oracle/But pay attention to
The string ID to be deleted is
Copy Code code as follows:
String sdsales_idstring = 1,2,3,4,5,6,7
Turn into array
Array array = Sdsales_idstring.split (new string[] {","}, Stringsplitoptions.removeemptyentries). Toarray ();
Define a
(i) The concept of an indexAn index is a database object related to a table or cluster, which provides a fast access path for querying data, reduces disk I/O, and improves retrieval efficiency.The index is composed of index values and rowid two
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