Lpad usage in Oracle
Pad Translation: FillThe lpad function adds a specified string to the left of the string. Usage:Www.2cto.comLpad (string, truncation length, added string ).
It is said that adding strings is not accurate. A more accurate
Insert into table (testcol) values ('')
The testcol field has been designed as not null during design, but we need to know that in SQL Server, null and space are different, that is, the preceding statement inserts an empty field, but is not null.
1. Understand Oracle External tables
External table definition: The structure is stored in the data dictionary, and the table data is stored in the OS file.
Purpose: query the OS file data in the database and load the OS file data to the
If you delete a data file in a tablespace before Oracle10g, the file will still exist in the Database Data Dictionary. Unless you delete the tablespace, the file information will not be cleared.
However, from oracle10gr2, Oracle allows us to
Partition Table Concept
Partitioning is committed to solving the key issues that support large tables and indexes. It uses a small and easy-to-manage partition-based piece (piece) method. Once a partition is defined, SQL statements can access a
Format:
Select column
From table_name
Start with column = Value
Connect by prior parent primary key = Child foreign key
Select lpad ('', 4 * (level-1) | Name, job, ID, super from EMP
Start with super is null
Connect by prior id = super
Example:
Raw
The ORACLE tutorial is: Renaming the foreign key of the Oracle system table.
The Foreign keys in Oracle tables are the means to ensure the integrity of the system's reference, and the integrity of the Reference refers to the constraints that are
The ORACLE tutorial is: Oracle SQL Performance Optimization Series 2.
4. 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
The ORACLE tutorial is: oracle date function.
There are many date functions in oracle,
For example:
1. add_months () is used to increase or decrease the date_value: = add_months (date_value, number_of_months) of some months from a date value.
A union array is previously called a PL/SQL table. Union arrays cannot be used in tables. They can only be used as structures for programming. Union Arrays can only be accessed in PL/SQL.
It is very important to note some key issues brought about
If a lock wait occurs, we may want to know who has locked the table and who has waited.The following statement can be used to query who has locked the table:
Copy codeThe Code is as follows: SELECT/* + rule */s. username,
Decode (l. type, 'TT',
When running the program today, enter the SQL statement in Oracle: select * from USERS
AsU, program error
Input select * from USERS u to query the result normally.
However, in SQL Server 2005, enter ''select * from USERSAsThere is no error in
1. The ORACLE parser processes the table names in the FROM clause in the order FROM right to left. Therefore, the table written in the FROM clause (basic table driving table) will be processed first. When the FROM clause contains multiple tables,
Sys; // System Administrator with the highest Permissions
System; // local administrator with the next high permission
Scott; // common user. The default password is tiger and is not unlocked by default.
Sys; // System Administrator with the highest
Prerequisites:
Database Table DM_xzqh example (partial ):
Copy codeThe Code is as follows: DM MC
230000 Heilongjiang Province
230100 Harbin
230101 municipal jurisdiction
230102 daoli District
232700 Daxinganling
230103 Nangang District
230104 road
The implementation of Oracle regular expressions is in the form of various SQL functions and a WHERE clause operator. If you are not familiar with regular expressions, this article will show you about this new extremely powerful yet mysterious
The ORACLE tutorial is as follows: startup after Oracle 9i Database is shut down abnormally. Oracle Database startup
A sudden power failure occurs during Oracle shutdown, and the database cannot be connected when SQL/plus is used for startup. The
The ORACLE tutorial is: use Oracle Parallel query to exert the power of multiple CPUs. ParametersLet's further look at how the number of CPUs affects these parameters.Parameter fast_start_parallel_rollbackAn exciting aspect of Oracle's parallel
The ORACLE tutorial is: how to directly run the OS command (below) in Oracle ). Exec SQL WHENEVER SQLERROR CONTINUE;Sqlglm (msg_buffer, & buffer_size, & msg_length );Printf ("Daemon error while connecting: \ n ");Printf ("%. * s \ n", msg_length,
The index organization table (IOT) can not only store data, but also store the indexes created for the table. The data in the index organization table is arranged according to the order after the primary key is sorted, which improves the access
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