Oracle's indexes can be grouped into 5 categories, including unique indexes, combined indexes, reverse key indexes, bitmap indexes, and function based indexes.
1. Standard syntax for creating indexes
The following refers to the content:
CREATE index
There is no indexof () function in Oracle
but provides a InStr () method specific use:
Select InStr (' Baoding Nanshi District ', ' City ', 1,1)-1 from dual;
Explanation: 1. The ' Baoding Nanshi District ' => can be an expression, or it can be a
When you use a different version of the EXP tool for database export in an Oracle database, you sometimes experience errors similar to the following:Exp-00003:no storage definition found for segment (11, 307)Exp-00003:no storage definition found for
--19-1: Create a function with no parameters create OR REPLACE function cur_datetime return VARCHAR2 are BEGIN return To_char (sysdate, ' YYYY ' year "MM" month "DD"
Day "Hh24″" MI "cent" SS "seconds" ');
End;
/--19-2: Create a function with input
Sql> CREATE TABLE T_long (ID number, long_col LONG); Table has been created. Sql> INSERT into T_long VALUES (1, Lpad (1, 32767, ' HELLO world! ')); 1 lines have been created. Sql> COMMIT; Submit completed. Sql> SELECT * from T_long WHERE
How Oracle aggregates multiple-line functions
In the BEA forum, see a masterpiece written by an "expert", an SQL statement is
Select r.xm,
substr (r.csrq,1,4) | | Years ' | | substr (r.csrq,5,2) | | Month ' | | substr (r.csrq,7,2) | | Th ' Csrq,
CREATE OR REPLACE TYPE str_split is TABLE of VARCHAR2 (4000);CREATE OR REPLACE FUNCTION splitstr (p_string in VARCHAR2, P_delimiter in VARCHAR2)Return Str_splitpipelinedAsV_length Number: = Length (p_string);V_start number: = 1;V_index
Table 1:
Table 2:
Now to get repid=48 corresponds to table 2 of the last day record, which is to investigate dealid=58
Sql:
SELECT *From Mgruserrepresentationsdeal MDwhere Md.dealid = (select Max (dealid) dealidFrom Mgruserrepresentationsdeal
As a result of unexpected circumstancesORACLE initialization or shutdown in progressPersonal understanding of the main if the archive log problems,First cmd1.sqlplus/nolog into Sqlplus2.connect/as SYSDBA Connection dba3.shutdown Normal Unload
In the development we often encounter such a scene, column, such as user modification simple personal basic information, this time need to determine whether the user's basic information exists, if the first entry does not exist in the table insert a
1, in order to improve the robustness of the stored procedures, avoid running errors, when establishing a stored procedure should contain the exception handling part.2, exception (EXCEPTION) is a PL/SQL identifier, including pre-defined exceptions,
###I. Architecture1. Database: Only one database2. Example: a process running in the background3. Tablespace: Logical storage unit4. Data files: Physical storage units5. Users: User-oriented management, the user to manage the tablespace, the user
Release RoadmapRelease 12.2:New releases would be annual and the version would be the last of the digits of the "release year." The release originally planned as 12.2.0.2 would now is release, and the release originally planned as 12.2.0.3 would be
Export and Export user objects:1. Plsql log in to the database2. Query the default tablespace for the current user (take DEMO1 account as an example)With DEMO1 user login plsql, in the window of the users branch to find the current user name DEMO1,
The current date is 2018/08/12.1. Get the number of days in the current month:Select To_number (To_char (Last_day (sysdate), ' DD ')) from dual2. Get the full date 30 days before the current date.Select trunc (sysdate-+)+ as from by RowNum ;The
Oracle has a high-speed buffering concept, which is to store executed SQL statements, which Oracle does a lot of work when executing SQL statements, such as parsing SQL statements, estimating index utilization, binding variables, reading blocks, and
Query some common ports in Oracle 10 Gb.
Under oracle \ product \ 10.2.0 \ db_1 \ install \, there is a file portlist. ini
It contains common ports and can be set as follows:
Ultra Search http port No. = 5620
Enterprise Manager Agent
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