1. How can variables is passed to a SQL routineBy use of the & symbol. For passing in variables the numbers 1-8 can is used (&1, &2,..., &8) to pass the values after the command into The SQLPLUS session. To being prompted for a specific variable,
View Oracle several ways to execute a planFirst, through the PL/SQL Dev tool1. Directly file->new->explain plan window, execute SQL in the window to view the planned results. Where the cost represents the CPU consumption, the unit is n%,cardinality
If you are using an Oracle database, then hibernate's mapping file. Hbm.xml is as follows:This ID is not generated automatically by the database, which needs to be noted, and the fields must correspond to the entity class, and the corresponding get (
Select Table_name,tablespace_name,temporary from user_tables where table_name like '%prov% 'Analysis:TABLE_NAME: Table name (VARCHAR2 (30));Tablespace_name: Table space to store table names (VARCHAR2 (30));Temporary: Whether it is a temporary table (
1. ORA-12560:TNS: Protocol Adapter errorOracleservice Service not started2, Ora-12541:tns: No monitoring programOracletnslistener Service not started3. Ora-12514:tns: The listener does not currently recognize the requested service in the connection
Permissions classification
1. System permissions: Permissions for database operations, including but not limited to:CREATE TABLECREATE VIEWCREATE SESSIONCREATE SEQUENCECREATE PROCEDURE......2, object permissions: For user-created tables, view
1. Case-When expressions have two forms--Simple Case function Case Sex When ' 1 ' Then ' men ' When ' 2 ' then ' women ' Else ' other ' END --case search function CaseWhen sex = ' 1 ' Then ' man ' When sex = ' 2 ' Then ' women ' Else ' other
VBA Round is based on the silver Connoisseur algorithm (rounds to the nearest even number)Round (1.5) = 2Round (0.5) = 0Implementing Banker Algorithms in Oraclesql> Create or Replace function Bankers_round (val number, rnd_digit number: = 0) return
[Email protected] ~]$ export ORACLE_SID=ORCL[Email protected] ~]$ Sqlplus/as SYSDBASql*plus:release 10.2.0.1.0-production on Mon Nov 10 23:04:36 2014Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to an idle instance.sql> startup
Before 11g, add a field with default value, the implementation principle is as follows:ALTER TABLE T1 add C1 varchar2 (a) default ' XX ' NOT null;Assuming that the T1 table has 40 million rows of data, Oracle returns a "Success Prompt" to the user
This article was reproduced from: http://www.cnblogs.com/linjiqin/archive/2011/04/18/2019990.html1. Transactions are used to ensure consistency of data, consisting of a set of related DML statements that are either fully or completely canceled by
drop table test Purge;CREATE TABLE Test (ID number,Code varchar (20),Name varchar (20));INSERT into test values (1, ' 201401 ', ' aaa ');INSERT into test values (2, ' 201402 ', ' BBB ');INSERT into test values (3, ' 201402 ', ' CCC ');INSERT into
Oracle Advanced SQL (iii) -- recursive query, oraclesql -- RecursionOracle has the connect by clause. Is used for hierarchical query. Recursive query. The syntax is as follows:
SELECT ... FROM WHERE START WITH CONNECT BY Note: 1. CONDITIONAL-1
Oraclenotexists equivalence statement
Not exists can be changed to left join + is null. It can be seen that the execution plan is the same before and after rewriting, and the resource consumption is the same, which means it is equivalent.
SQL> drop
When oracleSession is locked
A problem often occurs. A table in oracle cannot be updated suddenly, either through pl/SQL Developer or through sqlplus, the execution of the update statement or the execution of the select * from table_name for update
Select count (*) and select count (1), selectcount
Original article: http://blog.csdn.net/hzhsan/article/details/9186831
Generally, the returned results are the same for Select Count (*) and Select Count (1 ).
If the table does not have a Primary
Oracle zookeeper ********************************************
×Î ü ün § Ï ° Oracle zookeeper â £**ú ************************************* * ° Á when Oracle 10g £° ° then ± £° Oracle _ 10g_10.2.0.20.win32 ££ £?
° ² × ° Í ê é° ózant?ó ó Ó PL/SQL
DBA_Oracle DBA partition concept Summary (concept), dba_oracledba
2014-06-20 BaoXinjian
I. Summary
Some maintenance operations on table partitions:
Note: select a partition based on the actual situation.
Table partitions have the following
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