Get the App
SLTechnology News&Howtos  ›  Database  › 

The use of oracle index

Shulou Source: shulou.com Published: 2022-05-31 18:22:58 10月03日 Update

This article mainly explains "the use of oracle index". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "the use of oracle index" together.

----

index

inverse key index

t1 colour varchar2(20)

index

blue 1

blue 2

red 3

7788 AAAAAAAA

7900 AAAA

7901 AAAAA

7788 100

7900 010

7901 001

OLAP

PL/SQL--------Procedure Language SQL Procedural SQL Language

PL/SQL basic components "block"

block

Declare

Variable Type Cursor

operative

begin ... end ;

SQL statement

exception handling partial exception

An error is reported in the capture executor/and can be further processed

---Executor

begin

grant select on emp to scott;

end;

/

dql---select sal from emp where empno=7788;

dml---update emp set sal=123;

tcl---commit;

ddl---drop table emp;

dcl---grant select on emp to scott;

DQL----into

DDL DCL---Dynamic SQL

----

begin

dbms_output.put_line('hello word !!!!! ');

end;

/

-------------------------Declarations

variables

declare

Variable name Variable type [initial value];

Scott Salary Inquiry

select sal from emp where empno=7788;

1 declare

2 vsal number;

3 begin

4 select sal into vsal from emp where empno=7788;

5 dbms_output.put_line(vsal);

6* end;

ABC[4]

extend

Array PL/SQL Table

record

id number

---------Array-----------

declare

type a_varrary is varray(11) of number;

va a_varrary ;

begin

va := a_varrary();

va.extend(11);

select sal,deptno,mgr into va(1),va(2),va(3) from emp where ename='SCOTT' ;

dbms_output.put_line(va(1)||'--'||va(2)||'----'||va(3));

end;

/

------PL/SQL Table-------

declare

type a_table IS TABLE of varchar2(10) index by binary_integer;

va a_table ;

begin

va(2) := 'abc';

va(3) :='ddd';

end;

/

Thank you for reading, the above is the "use of oracle index" content, after the study of this article, I believe that we have a deeper understanding of the use of oracle index, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Tags: Indexes variables parts learning content arrays types processing dynamics names that is wages ideas situations articles more cursors knowledge points articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple MariaDB Redmi macOS