There are three ways to throw an exception
1. Use the PL/SQL Runtime Engine
2. Use the RAISE statement
3. Call the Stored Procedure RAISE_APPLICATION_ERROR.
When an error occurs during database or PL/SQL running, an exception is automatically
Dbms_random is a random function package provided by oracle. The following describes common examples of dbms_random:
Dbms_random.value usage:
Generate a 38-digit decimal number greater than or equal to 0 and less than or equal to 1
Copy codeThe Code
1. Install the patch package required by Oracle11g, which is available on the installation disc. Enter the Server Directory of the disc: (it is best to use the official oracle documentation to determine which packages need to be installed)
2. Modify
When writing another stored procedure, the following SQL statement is used:
Copy codeThe Code is as follows: select max (RE_DATE) INTO V_RE_DATE
FROM T_RECORDING
Where id = '000000'
It is reasonable to say that the query result based on this
Check whether the oracle database is in archive Mode
SQL> select name, log_mode from V $ database;
NAME LOG_MODE------------------------------------------TEST NOARCHIVELOG
SQL> archive log listDatabase log mode No Archive ModeAutomatic archival
Oracle provides two listener service registration methods: Dynamic and Static. The status of the dynamically registered service in lsnrctl status is ready, and the static service is unknown.
In versions earlier than 11g2, the listener is configured
Applicability:
When oracle sorts the query results, the column to be sorted has a null value, and the NULL value must be specified at the beginning or end of the column.
Keywords: Nulls First; Nulls Last
Default Value: the default value of null
Problem description: when creating a view under the scott user, an error is reported: the permission is insufficient.
(Other users and so on)
Solution:Log On As A dba user[SQL]Copy codeThe Code is as follows: sqlplus/as sysdba
Grant scott the
Many data conversion and processing operations may encounter the need to convert 0.007007040000 to 0.70%. We can use the Oracle SQL function to_char to achieve this conversion.
This function is used to convert the DATE or NUMBER data type to a
1. Static SQL and dynamic SQL Oracle compiler PL/SQL program blocks are divided into two types: one is the early compilation (early binding), that is, the SQL statement has been determined during program compilation, and most of the compilation
After finishing the project yesterday, I asked the test to test it. The test said that paging query does not seem to work. After Turning to page 4th, the data results will be the same.At that time, I was puzzled. It was impossible. The paging
Fault symptom
Oracle Database 11g Database common user login prompt ORA-28002: the password will expire within 7 days
[11: 01: 00oracle @ dvd db_1] $ sqlplus wang/oracle
SQL * Plus: Release 11.2.0.1.0 Production on Fri Nov 16 11:01:23
Typical problems are: Sometimes, it indicates that an index is created, but the query process obviously does not use the relevant index. As a result, the query process takes a long time and consumes a large amount of resources. What is the problem?
This article describes how to replace NULL values in SQL Server, Oracle, and MySQL.
In SQL Server Oracle MySQL What should I do if I find a NULL value in the database?
1. MSSQL: ISNULL ()Syntax
Java code
Copy codeThe Code is as follows: ISNULL
Copy codeThe Code is as follows: -- Created on 2010/11/04 by WANGNAN
Declare
-- Local variables here
I integer;
TYPE t_table is table of VARCHAR2 (10) index by VARCHAR2 (2 );
V_t_table t_table;
TYPE t_pg3 is table of asis.
Modifying a project involves modifying many tables in Oracle (including adding, deleting fields, and modifying comments ). As no records are recorded at the beginning, the tables that have been modified are missing during the test. Later, I found
How to deal with the high cpu usage of oracle, this article will introduce the high CPU usage of the oracle process, You Need To Know More friends can refer
1: first, use the TOP command to upload the SPID that occupies the CPU.
PID USERNAME THR PRI
1. telnet to a remote database server
CMD> telnet the IP address of the remote database
2. Users switching to the database
DQXXDBS01:/> su-oracle
3. Use a super user to access the database
$ Sqlplus "/as sysdba"
4. Check the parameters and whether a
During development, a cursor containing a table that does not have fields may be declared to solve special problems. This article will introduce such problems in detail. For more information, see
Data. * is a table, and then the fields in other
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