In an Oracle database, you can use variables to write generic SQL statements, and when you run SQL statements, enter values for the variables, and replace them with those values in the SQL statement.The temporary variable is valid only in the SQL
Calling stored procedures in stored proceduresCreate or Replace package body Pf_role_pack isProcedure Sp_getpage_role (Pagesize_ in number,--size per pagePageindex_ in number,--data page, starting from 1Rolenname_ Nvarchar2,Issys_ Char,Isused_
Invoking an Oracle stored procedure in JavaThis article describes how to invoke Oracle's stored procedures through Java1. Writing Stored ProceduresCREATEORPROCEDURE sp_pro3(sp_name VARCHAR2,sp_sal NUMBER )ISBEGIN --根据用户名修改工资 UPDATE emp SET sal=sp_
Review Oracle transactions today with the following records:
Transaction definition
A transaction is the consistency of the data, which is supported by the associated DDL or DML statements, and the results of the statement
When writing or modifying a stored procedure, it is easy to run into a bit of caution, and the code behind it overwrites the previous stored procedure. How to recover, the quickest and most convenient method, Flash query!1. Change the timestamp to
Using the edit command, you can copy the contents of the Sql*plus buffer into a file named Afiedt.buf, and then launch the default editor in the operating system to open the file, and the contents of the file can be edited. In the Windows operating
A Permanent tablespace contains persistent schema objects. Objects in permanent tablespaces is stored in data files.
an undo tablespace are a type of permanent tablespace used by Oracle Database to manage undo data if You is running your
using the Sqlplus spool command Operation Steps1. Create a new script file and store it, such as D:\spool.sql, with the following code Set echo off-when executing an SQL script with the start command, displays the SQL statement being executed in
--tanslate (STR,FROM_STR,TO_STR)--Replace the from_str in str with the TO_STRSelectTranslate'Hello','e','o') T fromdual;--InStr (STR,DES_STR)--can implement like functionSelectInStr'Hello','g'), InStr ('Hello','h'), InStr ('Hello','L')
Oralce's Save command
You can use the save () command to save the content of the current buffer to a file, so that even if the content in the buffer is overwritten,
The syntax for saving the current statement is also retained as follows:
Save [file]
Oracle fails to return an index due to an error.
There is a script that has been running for a long time and does not produce any results immediately after optimization. The original statement is as follows: SQL> explain plan for 2 select * 3 from
Oracle date operations1. Obtain the last day of a month.
SELECT TO_CHAR(LAST_DAY(TO_DATE('20140125', 'yyyymmdd')), 'yyyymmdd') LASTDAY FROM DUAL
2. Obtain the last day of the last month:
select to_char(add_months(last_day(to_date('2008-08-08','yyyy-
Oracle restrict connected IP addressesIn oracle, you can control which IP addresses can connect to the database and which IP addresses cannot connect to the database. In 9i and later, setting the allowed IP address and the prohibited IP address is
Routine Oracle Database Maintenance Manual
When the Oracle database is running, the DBA should monitor the database running logs and table space usage to detect database problems as early as possible.
1. Oracle warning Log File monitoring
Oracle
Use SQL * Plus to copy legacy Oracle Data Tables
You may be running an Oracle 10g Release 2 database server, but some applications must be supported. Data Tables created in versions earlier than Oracle 8 I often use the LONG data type to store large
Fully Understand Oracle database tables and views
The most basic data objects in Oracle databases are tables and views. Other data objects include constraints, sequences, functions, stored procedures, packages, and triggers. Database Operations can
How Oracle 10G select works, oracleselect
Internal execution of database query statements
Select * from table
Procedure
Analysis phase (parse)
1. Does the Shared Pool cache have this statement. If any, directly return results.
2. Check whether
Execute immediate, immediate
Create a table table_a during the creation of a stored procedure and use insert into to insert other data into table_a. However, because table_a does not exist during the creation process, A compilation error is
Oracle memory problems
In Oracle, the memory structure mainly includes two categories: SGA and PGA. SGA represents the system global zone, and PGA represents the program global zone.
Oracle memory mainly stores the execution program code (PL/SQL,
Oracle uses a cursor to add a primary key statement to all user tables
Application Scenario: adding an auto-increment primary key to a data table can speed up data table access, and is the fastest in integer indexing. This program is suitable for
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.