Decode function usage in OracleMeaning explanation:Decode (condition, value 1, return value 1, value 2, return value 2,... Value N, return value N, default value)The function has the following meanings:IF condition = value 1 ThenRETURN (translation
1. Install the Linux installation firstHttp://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.htmlRPM-IVH oracle-instantclient11.2-basic-12.1.0.2.0.x86_64.rpmRPM-IVH oracle-instantclient11.2-sqlplus-12.1.0.2.0.x86_64.rpmExport
First, prefaceThe author of the Oracle database understanding, a long time to stay in the "illusion" of the state, you say do not understand it, and will use, a take it up, on some basic concepts and can not say a way to ~ if you want to go farther
VARCHAR2 (size) A variable-length string whose maximum length is size bytes; The maximum value of size is 4000 and the minimum value is 1; You must specify a size of VARCHAR2;NVARCHAR2 (size) A variable-length string whose maximum length is a size
For the VARCHAR2 type, we need to make a trade-off in memory usage and efficiency. For the VARCHAR2 (length >=2000) variable, PL/SQL dynamically allocates memory to hold the actual value, but PL/SQL allocates enough memory for the VARCHAR2 (length
Delete Nameless PRIMARY KEY statement:SELECT * from WHERE = ' Table name ' ; ALTER TABLE DROP CONSTRAINT primary Key name;The above statement needs to be manual, how to do it automatically? See below:CREATE OR REPLACE FUNCTIONDel_table_constraint
In Oracle 11g, it is found that traditional exp cannot export empty tablesOracle 11g has a new parameter: deferred_segment_creation, meaning segment delay creation, which is true by default. What does it mean exactly?If this parameter is set to True,
In Oracle, sequence is the serial number, which automatically increases each time it is taken. Sequence is not related to tables. 1, create Sequence first to have create Sequence or create any Sequence permissions. Create the statement as follows:
Database design:Three-paradigm (old)Column values are unique and cannot have duplicate column valuesproperty is completely dependent on the primary keyMust meet the first paradigmMust have a primary keyThe other columns must be fully dependent on
---restore content starts---People want to see what data tables in the database, which fields have "HelloWorld" the string, now the database all the tables, views are not directly available, all must go through the loop to access all the data table,
Recently encountered a problem in the company's project, multi-level cascading navigation menu, although only a level three directory, but nested
, the database table structure is as follows:
1 CREATE TABLE FLFL 2 ( 3number
today, we mainly strengthen the learning of some related functions of the data type of Oracle database .(i) char and varchar2 String functionsconcat (CHAR1,CHAR2) string connection function for connecting two strings.--equivalent operation:
It was asked that the condition column was not indexed in MySQL when it was update, resulting in a table-level lock, while Oracle was a row-level lock.Here's a comparison of the row lock mechanism for MySQL INNODB engine and Oracle:INNODB
Oracle's paging query statements can be applied basically in the format given in this article.Paged Query format:View CodeSELECT A.* from( The most internal query, select * FROM table_name, represents the original query statement without paging.
1. Environmental assumptions:Noun Explanation: The application page is the page that the user sees in the browser, the general clerk will write the page in the page to set the code, this code is the data in the browser to the Web server transmission
/************** Date ********************/1.select trunc (sysdate) from dual--2013-01-06 today's date is 2013-01-062.select trunc (sysdate, ' mm ') from dual--2013-01-01 returns the first day of the month.3.select trunc (sysdate, ' yy ') from dual--2
Open Plsql, create a new stored procedure in the Packages folderRun the following statement in the SQL windowCreate or Replace package SY_USER_PKG1 isTYPE MyCursor is REF CURSOR;--Write your own test stored procedurePROCEDURE T_chcode1(V_phone in
1. Query this node and all nodes below this node:SELECT * FROM table1 C start with c.p_id= ' 0000000 ' connect by prior c.id=c.p_id and c.use_yn= ' Y ' ORDER by ID;2. Querying all hierarchical relationships in a nodeSELECTRPAD( ‘ ‘, 2*(LEVEL-1), ‘-‘)
Good programming habits are a necessary process. Good programming habits can vary from person to person, but simple, basic code-level: Write comments, proper indentation, line wrapping, variable naming, and so on.For US programmers, most of the time
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