1. Connect to MySQL database 1. Download The JDBC driver of MySQL, http://dev.mysql.com/downloads/ free,. 2. Unzip the ZIP file (the version I downloaded is the mysql-connector-java-5.1.5) and we will use the mysql-connector-java-5.1.5-bin.jar file.
Start the Oracle database with two operations:
1. Start the listener:
2. open a database instance:
the first operation is no different here, it is the standard usage of ant to call system commands. Let's take a look
-- Create a permanent tablespace and save permanent informationCreate tablespace bookspaceDatafile 'f: \ changweihua \ bookspace. dbf'Size 50 mAutoextend onNext 5 mMaxsize 100 m
-- Create a temporary tablespace to store temporary dataCreate
After reinstalling the system, we found that. net connection Oracle good, now always report errors, on the Internet on the ORA-00162 of the problem solution one by one try will not help, and my colleague machine with my configuration the same, but
Address: http://blog.csdn.net/kongxx/article/details/7107661
1. To enable python to operate the Oracle database, first install the cx_oracle package. You can obtain the installation package through the following address:
Select format:
Select [All | distinct] From , [,…]
[Where ]
[Group by [having ]
[Order by [ASC | DESC]
Statement description:[] Square brackets are optional[Group by [having ]Results are grouped by the value of . records with the same value
single table operations! ( Code can be replaced manually and written down for memory.) 1. create a table C reate table hkb_table_modify ( name varchar2 (6 ), Age varchar2 (3), sex varchar2 (2) )
2. modify a tableAdd field:ALTER
From: http://soft.zdnet.com.cn/software_zone/2008/0922/1144116.shtml
First, we will make a supplement to the stored procedure called sqlserver in the previous article, that is, if there are insert, update, delete and other operations in the stored
Order by is used to sort the select results. It is very simple, but let's summarize it.
1. sort by column name. The default value is ascending. Single Column Ascending Order: Select from order by ;Single Column descending order: Select from
From: http://www.cnblogs.com/attraction/archive/2004/06/04/13489.aspx
Stored Procedure return record set: Create or replace package pkg_testAsType myrctype is ref cursor;Procedure get (p_id number, p_rc out myrctype );End pkg_test;/Create or
Round and trunc date functions
Table 7-13 lists the format models you can use withRoundAndTruncDate functions and the units to which they round and truncate dates. The default model, 'dd', returns the date rounded or truncated to the day with a
Generally, when creating an oracle user, we may only create a user name, but do not specify a logon password for the user. Then we will grant this user certain permissions.
When we log on, we will find that when we log on with sysdba, We can log
Simple post main partCode.
. SQL
-- Define a packageCreate or replace package pkg_g_selectsp as type p_g_cursor is ref cursor;Procedure p_g_getpagingdata (Q_ SQL varchar2,Rowcountpage number,Indexnowpage number,Totalrows out number,Totalpages
(1) select the most efficient table name sequence (only valid in the rule-based Optimizer ): The Oracle parser processes the table names in the from clause in the order from right to left. The table written in the from clause (basic table driving
Comparative Analysis of query speed of nested SQL statements
ArticleUse the HR database that comes with Oracle, soCodeYou can directly perform the test.Code 1:
Select
T. employee_id, T. first_name, T. phone_number
From
HR. Employees t
During SQL Execution, sometimes the automatic optimization method is not optimal. We need to manually add hint to improve query efficiency.1./* + all_rows */It indicates that the overhead-based optimization method is selected for the statement block,
Cursor ----- An area in the memory that stores the select result
The cursor is used to process the multi-row records retrieved from the database (SelectStatement ). Use cursor,ProgramYou can process and traverse the entire record set returned by
Because I had to go home to work in two days and often had to deal with Oracle databases, I wrote an oracle error in Java today.
CodeThe small software to be queried is put into the mobile phone. If an error occurs in the future, check it out. It
Manage undo tablespace
1. Undo tablespace: Used to save the operation process and the data to be operated, and allows the user to cancel the operations performed on the database.
Purpose and role of revocation:
1. Transaction rollback
2.
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