Escape Character of access

Source: Internet
Author: User

Database Escape Character rules in access:

 

When data is inserted, updated, OR = matched, the text type can be enclosed by '', which can include", *, %, [,],/,/,?, (,), {,} Any combination. To insert a ', you need to write ''and coat a pair of'' in the entire expression''
For example, if you insert 'zhang ''3' into the database, the database contains three sheets. square brackets are not allowed.
 

When inserting, updating, OR = matching data, the text type can be enclosed by "". The options include ', *, %, [,], //,/,?, (,), {,} Any combination. To insert a ', you need to write ''and coat a pair in the entire expression ""
For example, insert "Zhang" and "3" in the database.

 

In fuzzy match, the text type is enclosed by ''. The options include", *,],/,/, (,), {,}, and any combination [, % ,?, Each special symbol must be followed by a pair of [],
To match [?, Like '% [[] [?] % ', Cannot write like' % [[?] % ', The latter will match with [or? And [? It may not be matched together.

 

Summary:

When inserting, updating, or equal to matching data, you can use ''to enclose the text type. You only need to convert'' In the expression''
During fuzzy match, the text types are all enclosed by ''and converted to''. For each [, % ,?, Enclosed in square brackets

 

 

Example:

Insert into test (name) values ("enclosed by 'dual' // * % ")
Insert a record with a pair of '/* % _ [[]"

 

Insert into test (name) values ('enclosed by "singles'' [({/* % ')
Insert a record with the [({/* %}]) slash (")

 

Select * from test where name like '* [%] [%]? [[] *'

Search for %? [String? Represents a character. * matches any character. % must be written in the program.

 

 

Select * from test where name like '* dual ''''*'

Search for strings containing duby''

Reference URL
Http://www.jb51.net/article/9280.htm
Http://topic.csdn.net/t/20051018/10/4333207.html
Http://access911.net/index.asp? U1 = A & U2 = 71fab01e10dceff3
Http://topic.csdn.net/u/20090828/15/e8e21e28-0ed0-47f2-b916-cac41d9589db.html
Http://zhidao.baidu.com/question/18060589.html

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.