Want to know how to pass parameter in oracle sql query? we have a huge selection of how to pass parameter in oracle sql query information on alibabacloud.com
Nonsense not to say more, directly to everyone to paste the code, the specific code as follows:
CREATE OR REPLACE FUNCTION f_get_param (In_param in VARCHAR2, In_flag in VARCHAR2) return VARCHAR2 is RES
ULT VARCHAR2 (500);
V_leng number;
V_left number;
V_right number;
V_param VARCHAR2 (200);
V_PARAM1 VARCHAR2 (200);
Begion Result: = ';
V_param:=in_param;
V_leng: = LENGTH (V_param);
V_left: = InStr (V_param,in_flag);
IF v_left > 0 THEN v_param1: = substr (v_param,v_left,v_l
Oracle experiences 1 -- oracle introduction @ basic SQL statement @ conditional query @ sort data theory and case studies1. Oracle IntroductionOracle is the first word for English translation of oracle (
OracleThe database must be started.Parameter file. This article summarizes the Oracle database startup parameter file and provides some SQL statements related to the startup parameter file. Let's take a look at this part.
Summary of parameter files:
1. Initial
Because of the security of the database, not easily SQL injection, the execution of query statements, generally do not use the direct stitching of the statement, but the use of parameter transfer method. Then, when using the method of parameter passing, it is found that a problem can easily occur when querying data usi
1. Oracle Introduction
Oracle is the first word for English translation of oracle (Oracle bone inscriptions) Unearthed from Yin.. Oracle is the world's largest supplier of information management software and services. It was founded in 1977 and is headquartered in Redwood sh
, password, and host online string (host string ). Each specific Oracle account has one Oracle schema and only one schema. Therefore, the schema name is equivalent to the account name of the schema owner. You can query the Data dictionary of Oracle to get more information about the schema.
SQL format execution sequence of oracle data structure and sequence number of SQL query processing, oraclesql
I. execution sequence of SQL format
FROM-> WHERE-> group by-> HAVING-> SELECT-> ORDER
1. The from clause assembles data from different data sources;
2. The where cl
By separatingSQL statement for local range data scanning
Generally, it is more effective to put all components of an SQL statement that implements a function together. However, in a few cases, the SQL separation method is more effective. This situation mainly exists in that when you query two tables with a 1: M relationship, the data used to filter the condition
1. The problem system has a module that needs to query data in the Oracle database. Currently, this is achieved by creating a linked server. The current query statement of limit is a simple
1. The problem system has a module that needs to query data in the Oracle database. C
Advanced query and difficulties of Oracle and Mysql SQLMysql query Yang Kai exclusive Channel OracleSQL 1. Connection query 1. Internal Connection is used to return all records that meet the connection conditions. By default, if no join operator is specified during connection query
Usage scenarios:For example, you need to query all student numbers with scores greater than 95, separated by commas into a string, from the Student score table.To prepare the test data:CREATE TABLE score (ID int,score int)INSERT into score values (1,90)INSERT into score values (2,96)INSERT into score values (3,99)It is now necessary to query the result string "2,,3" with a single statement.The
servers for execution. Instead of a where condition when the remote query is actually in place, the result is returned locally, and the filter is performed locally (there is a filter)
This speed is certainly very slow, because the query does not use the index lookup, the need to transfer all the remote data to the local before performing filtering, equivalent to full table scan, and more network transmiss
Query the SQL information of oracle processes that occupy the CPU 1: first, use the TOP command to pass the SPID number pid username thr pri nice size res state time cpu COMMAND3575 oracle 1 12 0 0 K 0 K run 748.6 H 24.98% oracle3571 ora
Oracle optimizer and SQL query execution sequence before Oracle executes an SQL statement, it first needs to check the SQL Execution Plan and then execute the SQL statement according to
condition record is met, and the final result is returned through the primary query. The filter execution plan will appear in the execution plan generated by the preceding statement, which also shows that this query is a special filtering operation (different from the traditional filtering operation, if traditional filtering operations become "Conditional filtering", such filtering operations can be called
Before executing an SQL statement, Oracle needs to first check the SQL Execution Plan and then execute the SQL statement according to the execution plan. The optimizer is responsible for analyzing the execution plan, under different conditions, an SQL statement may have mult
DESC) T1) T2Order by primary key ASC
For example, to retrieve 10 or 20 records from the table sys_option (primary key: sys_id), the statement is as follows:Select *From (select top 20 *From (select top 29 * From sys_option order by sys_id DESC) T1) T2Order by sys_id ASC
Oralce database --------------------------------------------------------------------------------Retrieve N records from the M records in the database tableSelect *From (select rownum R, T1. * from table name T1 where rownum W
In general, Oracle databases operate more efficiently than SQL Server databases in large data environments. From the query optimization alone, the two are quite different. Below, the author of the database query optimization of the difference to do a description, if there is not accurate place, but also please criticiz
Oracle 10g SQL paging query statement and Efficiency Analysis
When using the Oracle database for paging query algorithm design, the paging query SQL statements can basically be applied
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.