Like fuzzy query for oracle, mysql, db2, and SQL server in Mybatis, mybatisdb2

Source: Internet
Author: User

Like fuzzy query for oracle, mysql, db2, and SQL server in Mybatis, mybatisdb2

<! -- Oracle --> <select id = "searchUserBySearchName" parameterType = "java. lang. string "resultType =" com. urm. entity. user "> select * from t_user where user_name like CONCAT ('%', # {search_name}, '%') </select> <! -- Or --> <select id = "searchUserBySearchName" parameterType = "java. lang. string "resultType =" com. urm. entity. user "> select * from t_user where user_name like '%' | # {search_name} | '%' </select> <! -- Mysql --> <select id = "searchUserBySearchName" parameterType = "java. lang. string "resultType =" com. urm. entity. user "> select * from t_user where user_name like CONCAT ('%', # {search_name}, '%') </select> <! -- SQL server --> <select id = "searchUserBySearchName" parameterType = "java. lang. string "resultType =" com. urm. entity. user "> select * from t_user where user_name like '%' + # {search_name} + '%' </select> <! -- Db2 --> <select id = "searchUserBySearchName" parameterType = "java. lang. string "resultType =" com. urm. entity. user "> select * from t_user where user_name like CONCAT ('%', # {search_name}, '%') </select> <! -- Or --> <select id = "searchUserBySearchName" parameterType = "java. lang. string "resultType =" com. urm. entity. user "> select * from t_user where user_name like '%' | # {search_name} | '%' </select>


Different database languages: SQL server, Oracle, mysql, db2''

There are too many database system types. To put it simply, ACESS is suitable for small websites. asp and MYSQL are recommended for new websites. SQL Server is suitable for medium-sized websites and PHP is recommended for small websites. ORACLE is suitable for large websites and JSP is recommended for large websites! ~! ~! You can search for details!

Differences between mysql, oracle, db2, and SQL Server

Mysql is an open-source, free, small-sized, and concurrently executed database. Mysql is generally enough for applications, and it still needs to be upgraded in terms of exception handling. It is used for website design and small software. PHP + mysql is hailed as a perfect combination.
SQL server is Microsoft Data, which is easy to use and simple and suitable for beginners. It is generally used in. net programming.

Oracle is a large database with a large volume. It supports running multiple instances at the same time and is very powerful.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.