I. Define a primary key as an Automatically increasing identifier type
In MySQL, if the table's primary key is set to auto_increment type, the database automatically assigns a value to the primary key. For example:
Create Table MERs (ID int auto_
This type of requirement is usually met in Java development. If a piece of data already exists in the table, update it. If it does not exist, insert new data.
If you do not use the merge syntax provided by Oracle, you may first need to query the
The process is as follows:
SQL> show user;User is "sys"SQL> create user test identified by test;
User Created.
SQL> Create Table Test. t (ID INT );Create Table Test. t (id int)*Error at line 1:ORA-01950: no privileges on tablespace 'users'
Cause:
When Oracle 10g R2 is installed in cenotos 5.3 Chinese environment, the graphical interface is displayed, and Chinese characters are garbled.
After searching on the Internet, it is found that the library used for Oracle installation is not
In Oracle 10 Gb, the flash back family is divided into the following members:Flashback DatabaseFlashback dropFlashback tableFlashback query (flashback query, flashback version query, and flashback transaction query)The following describes the
Each table in Oracle has a rowid, which is an 18-character string, for example, aaangbaabaaao/kaaa. it contains a string consisting of A-Z, A-Z, 0-9, +. yes.
Where the A-Z corresponds to 0-25, A-Z corresponds to 26-51,0-9 corresponds to 52-61, +
1. create user groups and users
1) Add a user group:
Groupadd oinstall
Groupadd DBA
2) Add a user:
Useradd-G oinstall-g dba-D/home/Oracle-M Oracle
{-G indicates the user group,-G indicates the user's additional group,-D indicates the user's main
After oracle is installed in windows, some services will be created in windows, such as oracleoradb10g_home1tnslistener, which is used to listen to the Service port and oracleserviceorcl related to the instance to start the instance.
The following table lists the types of locks added to the table and the compatibility between the locks and other types of operations.
Table 13-3 Summary of table locks
SQL statement
Mode of table lock
Lock modes permitted?
If a database connection problem occurs, use the tnsping service name in the command line to check the cause of the error.
Common Errors include:
ORA-12535: TNS: Operation timeout
First, disable the firewall, which is the most common cause of
Oracle Auto-incrementing sequence Sequence
In Oracle, sequence is the so-called serial number, which is automatically increased every time it is obtained. It is generally used in places where the sequence numbers need to be sorted.1. Create
OracleThe keyword used in MSSQL similar to top is rownumber. The usage is as follows:
Select firmcode, balance from (
Select
Rownum
RN, T. firmcode, T. Balance
From firmbalance_tab
This is an operation to export all objects under the user's ebmall to the ebmall. dmp file under the test directory. The recorded log file is ebmall. log.
Expdp xxyy/xxyyp schemas = ebmall directory = test dumpfile = ebmall. dmp logfile = ebmall.
1. About Bare Devices
1.1 What is a raw device)
A bare device is a raw partition or raw logical volume that has not been created for a file system.
Character device driver to access it. How to read and write data on the device depends on the
Modify
Dbsnmp
Password
1.Stop em
Emctl stop dbconsole
2.Check if Em has been stopped
Emctl status dbconsole
3.Use sysUser Login sqlplus, Use the command to change the password
Sqlplus/As sysdba
alter user dbsnmp identified by ;
4.Verify
Document directory
Feedback
I. Preparation steps
Obtain the Oracle 10g installer or download the CD image from the Oracle technical network (OTN. During the evaluation phase, you can download and use full-featured oracle without technical
Use PL/SQL to read and write blob objects
1. Write files to blobSQL> Create Table iihero_blob (FIDIntPrimary Key, fnameVarchar(32), F BLOB );
The table has been created.
SQL> Conn/As sysdbaConnected.SQL> Create or replace directory blobdir as 'd:
Disclaimer: This article is a summary of my experience (iihero @ csdn) Exploring and learning Oracle databases. The method or process can only be used for development and learning and cannot be used for commercial product release, the offenders are
Common Errors During Oracle usage and development
(1) scripts generated by powerdesigner cannot be run directly;
Otherwise error: ORA-00942: Table or attempt not to exist
Http://www.cnblogs.com/chinafine/articles/1847011.html
(2) ORA-00904 invalid
Requirements:
When a record is inserted into a table, the ID of a column is automatically inserted and the inserted ID is auto-increment.
We can first create a sequence, such as goods_goods_id, and then use the following SQL statement each time to
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