Home > Database > Mysql Tutorial > How Do Wildcards Differ in Microsoft Jet's LIKE Operator Based on Query Mode?

How Do Wildcards Differ in Microsoft Jet's LIKE Operator Based on Query Mode?

Susan Sarandon
Release: 2025-01-10 10:59:41
Original
900 people have browsed it

How Do Wildcards Differ in Microsoft Jet's LIKE Operator Based on Query Mode?

Microsoft Jet's LIKE Operator: Wildcard Behavior Based on Query Mode

The Microsoft Jet database engine's LIKE operator uses different multi-character wildcards depending on the active ANSI query mode.

ANSI-89 Query Mode (Legacy Mode)

In ANSI-89 (legacy) mode, the asterisk (*) acts as the multi-character wildcard. This mode is generally associated with the DAO (Data Access Objects) interface.

ANSI-92 Query Mode (SQL Server Compatibility Mode)

Conversely, ANSI-92 mode (often used with ADO – ActiveX Data Objects – and the MS Access UI since version 2003) employs the percentage sign (%) as the multi-character wildcard.

ODBC and Explicit Mode Selection

When interacting with Jet via ODBC (Open Database Connectivity), the ExtendedAnsiSQL flag provides explicit control over the query mode, allowing you to select either ANSI-89 or ANSI-92 behavior.

The ALIKE Keyword (Unofficial)

Microsoft Jet SQL includes the ALIKE keyword. While it allows the use of ANSI-92 wildcards (% and _) regardless of the chosen query mode, it's crucial to remember that this keyword lacks official support and may not fully adhere to SQL-92 standards. Use with caution.

The above is the detailed content of How Do Wildcards Differ in Microsoft Jet's LIKE Operator Based on Query Mode?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template