Oracle Stored Procedures

CREATE TABLE STUDENT (--Creating student tablesID Number (TEN) PRIMARY key,--primary Key IDSNAME VARCHAR2 (20),);--Create a stored procedure to add a record to a student tableCREATE OR REPLACE PROCEDURE procedure_add(in_id in

Oracle Custom Functions

CREATE TABLE STUDENT (--Creating student tablesID Number (TEN) PRIMARY key,--primary Key IDSNAME VARCHAR2 (20),CLASSNAME VARCHAR2 (20)--Class);INSERT into STUDENT VALUES (1, ' Tom ', ' Svse ');INSERT into STUDENT VALUES (2, ' Jack ', ' GIS ');INSERT

Oracle transforms from function to system

hexadecimal conversion to decimal: To_number ()Sql> Select To_number (' A ', ' X ') from dual; To_number (' A ', ' X ')------------------10Decimal conversion to 16 binary: To_char ()Sql> Select To_char (ten, ' xxx ') from dual; To_char (, '----------

oracle-table is locked

1. If you update a table, without an error, waiting for a long time is not over, it is likely that the table is locked.2. View Locked objectsSelect sid,serial#,username,schemaname,osuser,machine,terminal,program,owner,object_name,

Linux under Occi operation Oracle Database, Chinese garbled problem

Reprint: http://www.linuxidc.com/Linux/2008-02/11238.htmThe first few days after the OCI connected to the database problem, with the Oracle's own example test, can read the data (all in English), it is safe to go to develop other modules. These days

Linux Oracle sqlplus Chinese garbled solution

Add to Oracle User's ~/.bash_profilenls_lang= "Simplified Chinese" _china. Zhs16gbkExport Nls_langThen save the exit,SOURCE ~/.bash_profileLogin again Sqlplus garbled on the lost.Note: The specific values of Nls_lang are modified according to the

A misunderstanding of Oracle parallelism 2--actually locks the whole table

I always thought that Oracle would only lock in the data that needed to be modified, but in parallel, the parallel update would lock the whole table, the following experiment:Session1:Sql> select Sid from V$mystat where Rownum=1;Sid----------11Sql>

"Oracle" deletes the user who is connecting

1. Querying the user's connection statusSelect username,sid,serial# from v$session where username= ' XY1027 ';USERNAME SID serial#------------------------------ ---------- ----------XY1027 22 1XY1027 142 12. Delete them individuallyAlter system kill

Oracle Database Creation Table Space

--oracle Database Creation Table spaceCreate Tablespace New_taspace--Table space nameDataFile ' D:\NEWTABLESPACE. DBF ' -the data file and location associated with the tablespaceSize 200M --File Initial sizeAutoextend on next 20MB MAXSIZE 400MB;

[Oracle] implements map matching in the database

The method to do the map match1 the algorithm proceduresFirst, we should find the most nearest road to the point from all roads in haerbin;Second, we should find the most nearest point-to-the-point from the road.For example, as Figure 1, we'll do

An explanation of the indexes in Oracle

First, the concept of ROWIDStores the location of row in the data file: 64-bit encoded data, A-Z, A-Z, 0-9, +, and/,How row is stored in the data blockSELECT ROWID, last_name from hr.employees WHERE department_id = 20;For example:

Oracle 11g DROP TABLE rear flash back

--Initialize datadrop table test Purge;CREATE TABLE Test as SELECT * from Dba_objects;Delete from test where object_id is null;ALTER TABLE TEST ADD constraint pk_test_object_id primary key (OBJECT_ID);CREATE INDEX ind_t_object_name on test

Password forget, modify Oracle database Password

1. Open cmd window, enter Sqlplus/as SYSDBA2, run CMD, enter the ALTER user username account unlock;3. Alter user name (System) identified by new password (m1234); Change Password (note: Be sure to enter the letter in the English input state,

The data pump export library is used in the Linux operating system.

The data pump export library is used in the Linux operating system. 1. create the physical directory dp_dir on Linux to store the database. dmp file; Log on as a root user, switch to an oracle user, and create a physical directory as follows: [Root @

Export oracle comments and oracle comments

Export oracle comments and oracle comments Indicates that a user has a comment + Table comment + field details + field comment select ATC.OWNER, atC.TABLE_NAME, utc.comments, ATC.COLUMN_NAME, ATC.DATA_TYPE,

Oracle Database beginners opening

Oracle Database beginners opening    Preface: For project reasons, I recently started to learn Oracle databases. Oracle is currently one of the most popular databases, with powerful functions and excellent performance. It is relatively difficult to

Solution to ORA-12560: TNS: protocol adapter errors

Solution to ORA-12560: TNS: protocol adapter errorsThere are three reasons for the problem that caused the ORA-12560: TNS: protocol adapter error:1. The listening service is not started. On the windows platform, perform the following operations:

Flashing back after oracle11gdroptable

Flashing back after oracle11gdroptable -- Initialize the data drop table test purge; create table test as select * from dba_objects; delete from test where object_id is null; alter table test add constraint pk_test_object_id primary key (object_id );

Oracle divides a column into multiple columns

Oracle divides a column into multiple columnsOracle divides a column into multiple columns In Oracle, we can use listparts (Oracle 11g and above) to merge multiple rows into one column. Now we need to split one column into multiple columns. Create a

Oracle Data Recovery

Oracle Data Recovery Recently, I am confused about how to clear the table data in oracle. 1. Back up the current data first. It is a good habit to back up data. Remember that there must be a backup each time you operate the database. 2. select *

Total Pages: 2147 1 .... 2029 2030 2031 2032 2033 .... 2147 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.