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_
1 Dynamic SQL is the concatenation of strings of SQL, using variables instead of specific values, 100,000 statements can be hash Chen a sql_id, can only parse onceFor I in 1..100000LoopExecute immediate' INSERT into T values (: x) ' Using I;End Loop;
Same Databasetwo different users user1 User2user1 there is a table table1create synonym inside the user2create synonym sy1 for user1.table1;once created, direct access is OK.select * from Sy1;data can be taken.but put it in a stored procedure.CREATE
#!/bin/bash# echo "Copy file:"# read-p "Please input the server share your OS installation media and Oracle software:" Server# Mkdir/installyationmedia# SCP [email protected]${server}:/iso/*/installationmedia# if [-e/installationmedia/*.iso]{# echo "
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
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
Use start with a= ' starting ID ' connect by prior a= BA is a subkey and B is the parent.Select F_ca_code,f_ca_parentcode,'0 Query Result:Where level is the Oracle built-in functionIf you join a query, you need to include it in front of start with:
Each table in Oracle has a ROWID, which is a 18-bit character string, for example: Aaangbaabaaao/kaaa. The string it contains consists of a-z,a-z,0-9,+,/of these characters. is 64 binary.Where A-Z corresponds to the 0-25,a-z corresponding to the 26-5
/* The following command checks the step--1 when running the */--task in Sql*plus without execution. Check if the instance session is restricted select Instance_name,logins from v$instance;-- If prompted logins=restricted perform the alter system
First, the packageA package is a database object that encapsulates the related plsql types, subroutines, cursors, exceptions, variables, and constants. The package contains two parts:1, Package Specification: You can declare types, variables,
Oracle creates tablespaces and users1. Connect to the database# Su-oracle$ Conn/as sysdba2. Create a tablespaceSQL> create tablespace doiido datafile '/main/oracle/oradata/doiido. dbf' size 1024 M autoextend on next 1024 M maxsize 10240 M extent
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 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
Oraclelike fuzzy query
In some queries, you may not be sure about the exact value to be queried. For example, when Baidu searches, you can enter keywords to query the relevant results. Such queries are called fuzzy queries.Fuzzy search uses the
Oracle Performance Optimization Operation 16: Using partition Indexes
When you use analysis commands to analyze partition indexes, the range of data values of each partition is stored in the Oracle Data dictionary.
Oracle can use this information
How does Oracle12c input scott users?
How does Oracle12c input scott users?
After installing oracle12c, unlike the original one, there is no scott user by default, and there is no corresponding emp or other tables. Of course, we can create one by
Steps for creating a quick and manual Oracle10g Database0. Modify Environment Variables[Oracle @ ocm1 ~] $ Vi. bash_profileAdd the following content: export ORACLE_SID = PRODExport ORACLE_BASE =/u01/app/oracleexport ORACLE_HOME = $
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