When the where statement contains the like condition, if the parameter needs to match special characters such as % and _, it must be processed; otherwise, it will be processed as a wildcard. Sqlserver: two solutions are available: Replace [with [], % with [%], and _ with [_]. (This solution is recommended) 2. Replace \ with \, [with \ [, and % with \ %, and _ \_;
Add the escape '\' after each field that requires like query '\'.
Note: Only parameters and SQL statements can be modified through oracle in the sqlserver2005 test. Replace \ with \, % with \ %, and _ with \ _. Then, add escape CHR (92 using nchar_cs) to each field that requires like query ), the SQL statement format is as follows: Select * from a where name like '% \ %' escape CHR (92 using nchar_cs) or ADDR like '% \ _ %' escape CHR (92 using nchar_cs); the length of escape CHR (92 using nchar_cs) must be written in Oracle 9i, 10 Gb in Oracle can be abbreviated as escape '\'
Note: similar to Oracle in the case that Oracle9i and 10G pass MySQL, you also need to use the escape statement. However, after testing, the escape '\' cannot be used, so the escape '/' is used '/'
Replace/with //, % with/%, _ with/_, and \ /\; add the escape '/' after each field that requires like query '/'.
Note: escape cannot be used for access tests in MySQL 5.5, but similar to sqlserver, you only need to replace [with [], % with [%], replace _.
Note: access2003 passed the test