Processing of paging SQL statements
The SQL statement for MySQL to process page flip is relatively simple. It uses limit to start the position and record the number. In PHP, you can also use seek to locate the result.
Set location.
It is complicated for Oracle to process paging SQL statements. Each result set has only one rownum field to indicate its position and can only
Rownum <100, not rownum> 80.
The following two SQL statements (ID is the field name of the unique keyword) are better after analysis ):
Statement 1:
Select ID, [field_name,...] From table_name where ID in (select ID from (select
Rownum as numrow, ID from table_name where Condition 1 order by condition 2) Where numrow> 80 and
Numrow <100) order by Condition 3;
Statement 2:
Select * from (select rownum as numrow, C. * from (select [field_name,...] From
Table_name where Condition 1 order by condition 2) c) Where numrow> 80 and numrow <100) order by Condition 3;
Processing of long strings
Oracle processing of long strings also has some special features. The maximum operable string length during insert and update is less than or equal
4000 single-byte characters. If you want to insert a longer string, use the clob type for the field to borrow dbms_lob from Oracle.Program
Package. Before inserting a modification record, make sure to judge non-null and length. If the field value cannot be blank or the field value exceeding the length is not allowed, a warning should be given,
Returns the last operation.
fuzzy comparison of strings
MySQL uses the field name like '% string %'
oracle can also use the field name like '% string %', but this method cannot be used index, low Speed
use a string to compare the instr function (field name, 'string')> 0 to get more accurate search results