1. group function usage rules: Group functions in mysql can be used at will in select statements. However, if a group function exists in the query statement in oracle, other column names must have been processed by group functions, or the column in the group by clause. Otherwise, the following error occurs: eg: select name, count (money) from user. This is put in mysql. No problem occurs in oracle. 2. Automatically increasing data types process MYSQL Data Types Automatically increasing. This field is not required when you insert a record, and the data value is automatically obtained. ORACLE does not have an auto-increasing data type. You need to create an auto-increasing serial number. When inserting a record, you need to assign the next value of the serial number to this field. Create sequence serial number name (preferably table name + Serial number mark) increment by 1 start with 1 MAXVALUE 99999 cycle nocache; www.2cto.com where the maximum value is determined BY the length of the field, if the defined auto-increment serial NUMBER (6) is used, the maximum value is 999999INSERT. insert this field with the value: the name of the serial NUMBER. NEXTVAL3. you can use double quotation marks to enclose strings in MYSQL. in ORACLE, you can only use single quotation marks to enclose strings. You must replace single quotes before inserting and modifying strings: replace all the existing single quotes with two single quotes. 4. Processing of paging SQL statements MYSQL's SQL statements for processing paging is relatively simple. Use LIMIT to start the position and record the number. In PHP, you can also use SEEK to locate the result set. It is complicated for ORACLE to process paging SQL statements. Each result set has only one ROWNUM field to indicate its position, and only ROWNUM <100, not ROWNUM> 80 can be used. The following are two SQL statements (ID is the field name of the unique keyword) that have been analyzed: 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) ORDE R by Condition 3; 5. ORACLE also has a special place for processing long strings. The maximum length of a string that can be operated during INSERT and UPDATE is less than or equal to 4000 single bytes. If you want to INSERT a longer string, use the CLOB type for the field to use the DBMS_LOB package that comes with ORACLE. Before inserting a modification record, you must make a non-null and length judgment. If the field value cannot be blank or the field value beyond the length is exceeded, a warning should be given, and the last operation is returned. 6. the DATE Field Processing mysql date Field is divided into two types: DATE and TIME. The oracle date Field only contains DATE, which contains the information of year, month, day, hour, minute, and second. the system TIME of the current database is SYSDATE, accurate to seconds, or use a string to convert to the date type function TO_DATE ('1970-08-01 ', 'yyyy-MM-DD') year-month-day 24 hours: minute: Second format YYYY-MM-DD HH24: MI: SS TO_DATE () has many date formats. For more information, see oracle doc. the mathematical formula for converting a datetime field to a string function TO_CHAR ('2017-08-01 ', 'yyyy-MM-DD HH24: MI: ss') www.2cto.com Date field is very different. MYSQL uses DATE_FIELD_NAME> SUBDATE (NOW (), INTERVAL 7 DAY) to locate the current time seven days from the current time and uses DATE_FIELD_NAME> SYSDATE-7; the following functions Insert the current time in MYSQL are: NOW () function returns the current date time with ''yyyy-MM-DD HH: MM: s'', which can be saved directly to the DATETIME field. CURDATE () returns today's DATE in 'yyyy-MM-DD 'format and can be saved directly to the DATE field. CURTIME () returns the current TIME in 'hh: MM: ss' format and can be saved directly to the TIME field. For example, insert into tablename (fieldname) values (now (). In oracle, when the current time is sysdate7. empty characters are processed, non-empty MYSQL fields are also empty, empty content is not allowed when a non-empty field is defined in ORACLE. The ORACLE table structure is defined based on the not null value of MYSQL. errors may occur when data is imported. Therefore, when importing data, you need to judge the NULL character. If it is NULL or NULL, you need to change it to a space string. 8. fuzzy comparison of strings MYSQL uses the field name like % 'string % ', and ORACLE can also use the field name like % 'string %'. However, this method cannot use indexes and is not fast, if you use a string to compare the instr function (field name, 'string') to 0, you will get more accurate search results. 9. After operating the database in programs and functions, pay attention to the release of the result set and pointer. Author runming918