A colleague wrote this article. Let's share it with you.
Create Table score(Fname nvarchar2 (50 ),Fsubject nvarchar2 (50 ),Fresult decimal (18, 0));Insert into score values ('zhang san', 'China', 20 );Insert into score values ('zhang san',
If you have already deleted
Sqlplus sys/orcl as sysdbaDrop user oawf1;Drop tablespace oawf1;Then manually delete the tablespace file.
// Create a tablespace in Oracle. Create a tablespace. Grant the DBA permission to import DMP data files.// Log
The following process is implemented in 9i:Declare type t_rn is table of TMP. rn % Type Index by binary_integer; type t_ran is table of TMP. num % Type Index by binary_integer; rn t_rn; ran t_ran; cursor cur_num is select rownum, trunc
Address: http://wentao365.iteye.com/blog/1156889
Sign Function:
Used to determine whether a value is positive, 0, or negative. The returned values are 1, 0, and-1 respectively.
Decode function: Decode (expression, value 1, result 1, value 2,
Raise_application_error is used to customize incorrect messages in PLSQL user programs.
This exception must be used in database subprograms (processes, functions, packages, and triggers), but not anonymous blocks and client subprograms.
Syntax:
2012-6-13
What is the address for accessing the Oracle database browser in a browser? What service should I start?
I. The local machine is installed with 10 Gb. Currently, both 10 GB and 11G are logged on to the management platform using a browser.
1. Create a stored procedureSQL> Create or replace function get_sal3 (name varchar2)2 return number is3 v_sal number (6, 2 );4 begin5 select Sal into v_sal from EMP where upper (ename) = upper (name );6 RETURN v_sal;7 end;8/
The function has been
From: http://blog.csdn.net/xuanxingmin/article/details/4266327
Oracle case statement
Currently, Oracle supports two case representation methods. One oracle is called simpleCase (simple form), and searched case (Query Form ). SimpleCase is
Lpad () function usage:
The lpad function fills the string on the left with some specific characters. The syntax format is as follows:
Lpad (string, N, [pad_string])
String: but a character or Parameter
N: the length of the character, which
--- Use an oracle user to go to sqlplus to delete the user and create another user and grant permissions
-- The permission must have synonym; otherwise, an error occurs when the imp dmp file is used.
Su-Oracle
Sqlplus/As sysdba
Drop user base
Three verification mechanisms for Oracle password forgotten Solutions
Oracle three verification mechanisms:
Server verification sequence: 1: operating system verification 2: configuration file verification 3: password verification
The
How to view the database name SID of Oracle
Join it Software Technology Discussion QQ: 228249641 clicks
Use sysdba to log on as an anonymous administrator, for example, Conn/As sysdba.Execute select name Form V $ database; or execute select *
How to handle clob
Dynamic PL/SQL processing of clob Fields
2001-03
Dynamic PL/SQL. For clob field operations, you can pass the table name table_name, the unique table Identifier Field name field_id, clob field name field_name, record number v_id,
1. Start and Stop TNS listening
LSNRCTL start
LSNRCTL stop2. start Oracle services
Net start oracleserviceorcl
Net stop oracleserviceorclsql> show all -- View All 68 system variable values
SQL> show user -- display the current connected user
SQL>
Connect by is used in structured queries. Its basic syntax is:
Select... from tablename start by cond1
Connect by cond2
Where cond3;
Simply put, a tree structure is stored in a table. For example, a table has two fields:
The ID and parentid indicate
Oracle stored procedures support arrays, which greatly improves the performance of batch data operations. If you need to insert 1000 records, the test_info table structure is:
--------------------------------------------------------------------
Id_
Oracle has two optimization methods when executing SQL statements: Rule-Based RBO and cost-based CBO. The Oracle parameter optimizer_mode determines the optimization method used during SQL coaching.
Rule Based optimizer (RBO) based on RulesCost
Dual is a virtual table used to form the select syntax rule. Oracle ensures that there will always be only one record in dual. We can use it to do a lot of things, as shown below:
1. view the current user. You can execute the following statement in
1. PLSQL debugging stored procedure:
1. Configure the connection in Oracle configuration and migration tool named ". net manager"
2. Create an SQL window in PLSQL and write the Stored Procedure
3. Create a test window in PLSQL and call between
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