In the previous chapter has introduced a general, here is the main introduction of specific methods:The first step is to download three compressed packages, respectively:The second step, the compression package processing (some files are overwritten
Oracle database table How can I think of MySQL as an integer primary key with auto-add function?If you have to create a tableCREATE TABLE tab{ ID number not NULL PRIMARY key,--primary key. . . } Then, you have to create a
Oracle Multi-Table Query 1 put multiple data into one fieldSelect Id,zhzxm,fzhzxm,ltrim (Max (Sys_connect_by_path (XM, ', ')), ', ') XMFrom (Select Id,zhzxm,fzhzxm,xm,row_number () over (partition by ID ORDER by LRSJ) RN--mark the same
SequenceSELECT * from User_sequences select Last_number from user_sequences where sequence_name= ' t_jgxx_poly_seq '; alter sequence T_jgxx_poly_seq increment by 1; SELECT T_jgxx_poly_seq. Nextval from DUAL;MegerMerge into T_jgxx_poly jgusing T_jgxx_
I. Parameter file descriptionPFILE (initialiazation Parameter files) initializes the parameter file, which is a text file that can be viewed directly using a text editor.If the database is using the initialization parameter file Pfile, to
--Use a subquery to find an indeterminate value--Sub-query and select statementSELECT e.emp_id, E.first_name, E.last_name, EP. Pay_rateFrom Employee_tbl E, Employee_pay_tbl EPWHERE e.emp_id = EP. emp_idand EP. Pay_rate (SELECT pay_rate from employee_
Delete Table duplicate data (T1 table with duplicate data)1. Using distinctCREATE TABLE t2 as select * from T1;CREATE TABLE Tmp_t2 as SELECT DISTINCT * from T2;drop table T2;alter table tmp_t2 Rename to T2 (need to stop business)---------------------
Turn from: http://www.cnblogs.com/252e/archive/2012/09/13/2682817.html Query and delete duplicate records of SQL statement 1, find redundant records in table, Duplicate records are based on a single field (ID) to determine select * from table
To view the table space status statement:Select Tablespace_name, status from Dba_tablespaces;CREATE TABLE SpaceCreate Tablespace MySpaceDataFile ' G:\app\myspace\myspace01.dbf 'Size 10m autoextend on next 5m maxsize 100m;Table Space properties are
SQL statement for querying and deleting duplicate records1, look for redundant records in the table, duplicate records are based on a single field (ID) to determineselect * FROM table where Id in (select ID from table group Byid have count (Id) > 1)
Ha, which only monitors and manages the database at the operating system level, is generally used only for single-instance databases. The advantages are convenient management, convenient application development (developer convenience), and less
Oracle Data Type-4
18. NCLOBThe character set defined by the international character set of the database can be used to store character-based data of the Unicode type only. A maximum of 4 GB of data can be stored, which is larger than the maximum
Oracle Data Type-1In Oracle databases, each relational table consists of multiple columns. Assign a specific data type to each column to define the data type that will be stored in this column.
1. CHARA maximum of 2000 characters or bytes can be
Oracle Data Type-3
9. TIMESTAMP WITH TIME ZONEIt contains all fields in the TIMESTAMP data type. In addition, it also contains two additional fields: timezone_hour and timezone_minute. This data type contains information about supported time zones.
Oracle recursive queryCreate a table and a primary foreign key
CREATE TABLE SC_DISTRICT( ID NUMBER(10) NOT NULL, PARENT_ID NUMBER(10), NAME VARCHAR2(255 BYTE) NOT NULL);ALTER TABLE SC_DISTRICT ADD (
ORA-02287: sequence numbers (sequencenumbernotallowedhere) are not allowed here to avoid and enforce implementation
Scenario 1:
SELECT id,name FROM (select SEQ_B_LOG_ID.NEXTVAL id , 'elong_deo' name from dual);
Scenario 2:
Insert into B
Use OCCI to access the Oracle database (4)
1. When executing Environment * env = Environment: createEnvironment ();, an exception is thrown, the Code is a ORA-32104, but there is no error message
The reason is that the library used does not
Personal notes-oracle
Sequence
select * from user_sequences select last_number from user_sequences where sequence_name='T_JGXX_POLY_SEQ';alter sequence T_JGXX_POLY_SEQ increment by 1;SELECT T_JGXX_POLY_SEQ.NEXTVAL FROM DUAL;
Meger
merge into
Return values of stored functions and functions.Directory
I. return values of functions
1. Retrieve the system type data of the Function
2. Retrieve the custom data of the Function
3. Set of user-defined data of the Function
Ii. return values of
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