Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The use of oracle index

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report