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
The Oracle tutorial is: Analysis of garbled characters in the Oracle 8i Character Set and solutions. I. Problem Description
SQL plus worksheet is an SQL statement editor for window graphic interfaces. This tool is very popular with SQL/plus for
If you directly execute SQL statements or bind parameters, you don't have to worry too much,
See the following Oracle stored procedures
Create or replace procedure kjdatepoc (date D)
As
Begin
Insert into kjdatetable values (d );
Commit;
Respect copyright for any reposted content. (Author: iihero on csdn)
1. How to Create a Java stored procedure?
There are usually three methods to create a Java stored procedure.
1. Use Oracle SQL statements to create:
E.g. Use create or replace and
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
Go to sqlplus
SQL> set timing on
SQL>
SQL> select count (*) from comm_human_role;
Count (*)
----------
866
Elapsed: 00:00:00. 05
The preceding digital outputs are: Hours: Minutes: seconds. milliseconds.
It takes 0.05 seconds to execute,
1. view the currently unlocked object
Example: Execute select * from aa for update to lock the table aa;
Method 1: query by SQL
Select 'alter system kill session ', ''' | trim (t2.sid) |', '| trim (t2.serial #) | ''';'
From v $ locked_object t1,
Oracle has the following types of tables:1. heap organized tables ):Common table types are managed in a heap mode. When adding data, the first free space suitable for data size in the segment is used. When deleting data, the space left can be reused
The Lag and Lead functions can retrieve the data of the first N rows and the value of the last N rows of the same field in a query. This operation can be achieved through table join for the same table, but LAG and LEAD are more efficient.
Copy
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: use Oracle Parallel query to exert the power of multiple CPUs. Parameters
Let's further look at how the number of CPUs affects these parameters.
Parameter fast_start_parallel_rollback
An exciting aspect of Oracle's parallel
The ORACLE tutorial is: automatic backup of the Oracle database. I believe that many system administrators are doing the same job every day-backing up data. Once the system fails and data recovery is required, the system is powerless. It would be
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
When two concurrent transactions access the same row in the database table at the same time, there may be three problems:
1. Fantasy read: Transaction T1 reads a statement that specifies the where condition and returns the result set. At this time,
The permission system of the oracle database includes system permission and object permission. Database system privilege allows users to execute specific command sets. For example, the create table permission allows users to create tables, and the
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 ORACLE tutorial is to optimize the Oracle downtime and database recovery.
Here we will discuss the steps to minimize Oracle downtime. Various types of downtime-planned or unplanned-always happen. a dba should have the correct backup policy so
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