The unit used Oracle to store the string type into the database CLOB, to view the data online to find a solution. As follows:1 Public classClobtest {2 3 StaticString url = "JDBC:ORACLE:THIN:@10.12.10.18:1521:ORCL"; 4 StaticString user = "cwbe1_9999"; 5 StaticString pwd = "or777"; 6 StaticString Text = "This is the data to be inserted into the CLOB, update the data!
The following is the DB2 connection database1) Use IBM.Data.DB2 link DB2 database2) DB2 client must be installed, IBM. DATA.DB2 can be found in the installed bin.3) Note The DB2 client version problem, my is WIN7 need V10 version, server win2008 use V9.7 version, WIN7 under V9.7 not installed.CodeCodeString connectionString = "Server=ip address (can add port number);D atabase= library name; uid= user name; pwd= password; ";String commandtext = "Select
Single-row functions-character functions although each database supports SQL statements, each database also has the operation functions supported by each database. These are single-row functions. If you want to develop a database
Single-row
This article mainly summarizes the string processing functions that are frequently used in the development process. They are very useful when processing strings. The following functions are provided in summary.
1. String concatenation operator
2. substring Extraction
3, left and right
4, Len and datalength
5. charindex
In SQL, PL/SQL functions are used. Many oracle database developers prefer PL/SQL functions and storage to simplify the code. for example, select empno, ENAME, DNAME, loc from emp, dept where emp. DEPTNO = DEPT. DEPTNO; for such an
Label:has been verified. Requirements: A. A string in a database table may contain a "+" Example: orc+001 may also not contain "+" B. Request if the string contains "+", the character before "+" is taken: orc+001 take ORC C. If the string does not contain "+", the string is taken directly. Solution: Use INSTR,SUBSTR in
The character function is the most commonly used function in Oracle, so let's see what the character functions are: lower (Char): Converts the string to lowercase format. Upper (Char): Converts a string to a uppercase format. Length (Char): Returns the length of the string.
It was freezing, and I stayed at home and read "Mastering Oracle SQL" 2nd. I found that Oracle is still very powerful, and there are two hundred optical functions. It is difficult to simulate the Object-Oriented Query languages, in particular, Windows functions for OLAP in s
, pl SQL development, toad SQL development, SQL navigator, and other database management tools are installed. An oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer.
In this case, I use pl SQL development to rem
is the number of strings returned, and if this number is shorter than the length of the original string, the Lpad function will intercept the string as a left-to-right n character;Pad_stringOptional parameter, this string is to be pasted to the right of the string, if this argument is not written, the Lpad function wi
.
Select field name 1, field name 2 ,...... From table name 1, [Table name 2,...]Order by field name 1, field name 2 DESC;
Fuzzy string comparison
Instr (field name, 'string')> 0Field name like 'string % '[' % string % ']
Each table has an implicit field rowid, which indicates the uniqueness of the record.
4.
PL/SQL single-line functions and group functionsA function is a program that has 0 or more parameters and has a return value. Oracle built a series of functions in SQL that can be called SQL or PLFunctions are divided into two mai
, 2) LENGTH ('World') REPLACE ('SQL', 'Q', 'x ')
--------------------------------------------------------
He 5 sXl
In the above example, we can see that the function of substr () is to intercept a string, followed by two parameters. The first parameter represents
Start position. The second parameter indicates the number of interceptions. The length () function returns the length of the
Oracle data types, functions and stored procedures, and oracle Data TypesString typeFixed Length: char nchar n indicates Unicode encodingVariable Length: varchar2 nvarchar2Number Type: number (P, S) P: integer digits, S decimal placesIntegerBINARY_FLOAT Single Floating PointBINARY_DOUBLE Double Floating PointFLOAT (N) floating point number N indicates precisionDA
Character TypeASCIICHRLOWERUPPERINITCAPCONCATSUBSTRLENGTHINSTRTRIMDumpLpadRpadREPLACEASCII ('characters ')Returns the ASCII value of a character.Idle> select ASCII ('A') from dual;ASCII ('A ')----------97
Idle> select ASCII ('A') from dual;
ASCII ('A ')----------65
Idle>
CHR ('n ')Returns the character value n of n, which is the ASCII number.Idle> select chr (65) from dual;
C-A
Idle> select chr (39) from dual;
C-'
Idle>
However, the ASCII code format for single quotes is very special. There are
)
Returns a string of N octal values, where N is a longlong (BIGINT) number. This is equivalent to CONV (N, 10, 8 ). If N is NULL, the return value is NULL.
Mysql> select oct (12);-> '14 ′
◆ OCTET_LENGTH (str)
OCTET_LENGTH () is a synonym for LENGTH.
◆ ORD (str)
If the leftmost character of the string 'str' is a multi-byte character, the code of this character is returned. The code is calculated using the f
Difference between concat and concat_ws () and several practical MySQL string functions bitsCN. com1 and concat ()
1.1 The concat function of MySQL can connect one or more strings, such
Mysql> select concat ('10 ');
+ -------------- +
| Concat ('10') |
+ -------------- +
| 10 |
+ -------------- +
1 row in set (0.00 sec)
Mysql> select concat ('11', '22', '33 ');
+ ------------------------ +
| Concat ('11',
A string or string (string) is a finite sequence consisting of 0 or more characters. Generally recorded as s= ' a1a2 an ' (n>=0). It is the data type that represents text in the programming language.
A string is usually used as an action object, such as finding a substring in a st
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.