stored procedures and stored functions refer to subroutines stored in the database for all user programs called stored procedures, stored functions。
The stored procedure does not return a value. Stored function has return value
Creating a stored
SQL1:
Copy Code code as follows:
--1, viewing the name and size of the table space
SELECT T.tablespace_name, round (SUM (Bytes/1024 * 1024)), 0 ts_size
From Dba_tablespaces T, Dba_data_files D
WHERE T.tablespace_name =
Server is Windows Server 2003, after the Oracle client is installed normally, the Chinese are found when inserting data.
Abnormal:
In Pll/sql, select Userenv (' LANGUAGE ') from Dual is entered and the result is american_america. Us7ascii,
Under [
When you use the start with connect by nocycle prior
When you are looking for data recursively, the performance of the following two sections of code is definitely different. Please note that the code can not see the following directly to see my
In an Oracle query, use Oracle's Decode (field, ' field value ', number) if there is no sort, but you want to have the information of a particular value in a column go ahead.
If you want to have name= ' John ' results in front of all the data from
Use OCI to list data in all datasheet ' Email_info '
Ditto, just use OCI to write
Related PHP Code:
PUTENV ("Oracle_sid=orasid");
$connection = Ocilogon ("username", "password");
if ($connection = = False) {
echo Ocierror ($connection).
1. Test Add Data procedure
Copy Code code as follows:
public void TestProcedure () {
Connection con = getconnction ();
**1. Test procedure to add dataString procedure = "{call Users_insert_proc (?,?,?,?)}";
CallableStatement cs =
When you define variables, constants, and parameters in your program, you must specify the Pl/sql data type for them. When writing Pl/sql programs, you can use scalar (Scalar) types, composite (composite) types, reference (Reference) types, and lobs
But using stored procedures has at least two of the most obvious advantages: speed and efficiency. The speed of using stored procedures is obviously faster. In efficiency, if you need to do a series of SQL operations, you need to go back and forth
The examples in this article describe the Java-based ODBC-connected Oracle implementation approach. Share to everyone for your reference, specific as follows:
1. Load Oracle Driver
Oracle.jdbc.driver.OracleDriver
2. Establish a connection to a
Multi-line function called combination function (group functions), aggregate function1. Types of Group functionsAVG, COUNT, Max, Min, StdDev, sum, varianceAvg for averageSelect AVG (NVL (column 1,0)) from table 1Count Number of rowsAggregate
This article illustrates the Java implementation method for Oracle to insert the current time. Share to everyone for your reference. The specific analysis is as follows:
When I was doing a inser operation,To get the current time into the databaseis
In large database systems, stored procedures and triggers play an important role. Both a stored procedure and a trigger are collections of SQL statements and Process Control statements.
Oracle Code
CREATE OR REPLACE PROCEDURE gd_cursor
Before running the following script, you need to use the SQL that generates the AWR report (the program script is typically kept in the rdbms/admin under $oracle_home, The name is awrrpt.sql and you need to enter the number of days to generate the
1.1 Unpacking the installation packageORACLE11GR2 installed as two installation packages, all extracted, you need to combine the contents of two installation packages to install
oracle version
linux64_11gr2
Query and delete duplicate records of SQL statement 1, find redundant records in the table, duplicate records are based on a single field (ID) to determineSelect * from where inch (Selectfromgrouphavecount>1)2, delete redundant records in the table,
MySQL's self-growth is very easy, a auto_incritrem is done, but Oracle is notThe following is the self-growth of Oracle#创建一个表CREATE TABLE t_test_departments (ID number (Ten) not null,description VARCHAR2 ( -Not NULL); #创建一个表CREATE TABLE
One, what is transaction transaction is used to guarantee the consistency of data, it consists of a set of related DML statements, the group of DML (data manipulation language, additions and deletions, no query) statement either all succeeded, or
/**************************** table Space start****************************/--the role of table space/**1. Determining the spatial allocation of database Entities 2. Set the space share of the database User 3. Control the availability of some data
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