TableinWhere NOT EXISTS (SELECT * from Tablein where Tablein.aid = 7)The use of exists and in efficiency, usually using exists is higher than in efficiency, because in does not walk the index, but depends on the actual use of:In the case of large appearance and small inner table, exists is suitable for small appearance and large inner table. --------------------------------------------------------------------------------------------------------------- -------------------------------------------
in
Oracle/plsql, the
substrFunctions allows to extract a substring from a string.
The syntax for the
substrfunction is:
substr(String, start_position, [length])
Description
The string is the source string.
Start_position is the position for extraction. The position
inThe string is always 1.
The length is optional.It is the number of characters to extract. If This parameter is omitted,
substrWould ret
Oracle:
Syntax:
Substr (string, a, B ):
A: Starting from the nth digit, the first digit a = 1,Last Third digit (right in sqlserver) a =-3
B: Several Characters[SQL]
Substr ('This is a Test', 6, 2) wowouldReturn'Is'
Substr ('This is a Test', 6) wowouldReturn'Is a Test'
Oracle substr function usage
Obtain the string substr (string, start_position, [length]) with the specified start position and length in the string.
Substr (string, truncation start position, truncation length) // return the truncated word;
When start_position is set to timing, the string is obtained from left to right
);//Return Result: Rld, 3 characters back from the last D ( Note: When there are only two parameters, either negative, it is intercepted from the last start (e.g. 13, 14, and).) Graphic: 1. 2. 5. 6. 7. 8. 13. 14. 15. 3) Complete Function instance Create or Replace function Get_request_codereturnVARCHAR2 as--function: Automatically generate a number v_mca_no mcode_apply_01.mca_no%TYPE; CURSOR Get_max_mca_no is SELECT max (substr (Mca_no, One
The decode () function is one of the powerful functions of Oracle Pl/sql, and it is currently available only in Oracle company SQL, and not in the SQL implementations of other database vendors. (But it's not a standard SQL functio
InStr function, we often use this: find the location of the specified substring from a string. For example:Sql> Select InStr (' abcdefgh ', ' de ') position from dual;POSITION----------4Starting from 1, the D row is the four, so return 4.Sql>select InStr (' Abcdefghbc ', ' BC ', 3) position from dual;POSITION----------9The 3rd character starting from the 3rd character is C, so find the BC after the 3 string, return 9---------------------------Startin
SUBSTR (' This was a test ', 6, 2) = ' is '
SUBSTR (' This was a test ', 6) = ' is a test '
substr (' techonthenet ', -3, 3) = ' Net '
substr (' Techonthenet ',-6, 3) = ' the '
substr (' ABCDE ', -6) = null
substr (' ABC
Tags: hello BST binary return result SQL function return nbsp HTTP charDB2 left , right functionSyntax: Left (arg,length), right (Arg,length)The left and right functions return the leftmost, rightmost length string of arg, which can be a char or binary string.egSELECT Left (name,2), right (name,2) from T1ORACLE substr () functionSUBSTR (string, intercept start position, intercept length)//return intercepted
1:update table Name set column name = SUBSTR (column name, INSTR (column name, ' match character ', "+1") Where condition like '%*% '2:select SUBSTR (column name, INSTR (column name, ', ', +1) as D from table name T where condition like '%-% ';Example: Select INSTR (' orc+001 ', ' + ', ' a ') from dualThe return is "4" if the string has no matching character and returns "0".The format of the Instr:instr met
Oracle (replace + substr) function used in combination, oraclesubstr
select replace('33021622221111',substr('33021622221111',7,4),9527) from dual;
How to Use the substr function in oracle
SubstrTruncates string functions in Oracle.Syntax:Substr (string, start_position,
In Oracle/PLSQL, The substr functions allows you to extract a substring from a string.
The syntax for the substr function is:
Substr (string, start_position, [length])Note:String is the source string.Start_position is the position for extraction. The first position in the string is always 1.Length is optional. It
Usage of InStr and SUBSTR in Oracle
Usage of instr in Oracle:
The format of the InStr method is
INSTR (The source string, the string to find, starting with the first few characters, to find the ordinal number of matches)
Returns the location found, or 0 if it is not found.
For example: INSTR (' CORPORATE FLOOR ', ' or ', 3, 2), the source string is ' CORPORATE FL
Substr () function: returns part of the string.Syntax: substr (string, start, length)Required: specifies where the string starts.Positive number-start at the specified position of the stringNegative number-starting from the specified position at the end of the string0-Start at the first character in the stringExample:Substr ("ABCDEFG", 0); // return: ABCDEFG, intercepting all charactersSubstr ("ABCDEFG", 2)
Tags: font BST usage pos Hello com www results Oraclesimple usage of substr functions in Oracle SUBSTR (string, intercept start position, intercept length)//return intercepted word substr (' Hello World ', 0, 1)//return result is ' H ' * start with a string of length 1 from the first character
Common functions: Substr and InStr1.SUBSTR (String,start_position,[length]) to substring, return stringExplanation: String meta stringsStart_position start position (starting from 0)Length optional, number of substringssubstr ("ABCDEFG", 0); --Return: ABCDEFG, intercept all characters substr ("ABCDEFG", 2); --Return: CDEFG, intercept all characters after starting
oracle| function
In Oracle/plsql, the SUBSTR functions allows you to extract a substring a string.The syntax for the SUBSTR function is:substr (String, start_position, [length])
DescriptionThe string is the source string.Start_position is the position for extraction. The the position in the ' string is always 1.The len
One: Theory
Oracle Intercept character (SUBSTR), retrieving character position (instr) case when then else End statement uses favoritesCommon functions: Substr and InStr1.SUBSTR (String,start_position,[length]) to substring, return stringExplanation: String Meta stringStart_position starting position (starting from 0)
substr (String, -10) Oracle string function substr (string, intercept start position, intercept length) 1. If the last intercept length parameter is empty, it means that the intercept starts at the bottom 2. If you intercept the start position To a number greater than 0, the beginning of the number from the left of the string 3. If the Intercept starts at a
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.