Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 582573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:42:04+00:00 2026-05-13T14:42:04+00:00

I am familiar with this kind of query: select * from tableA where foo

  • 0

I am familiar with this kind of query:

select * from tableA where foo like '%bar%'

But today I run into three adjacent percentage signs in some legacy code, like this:

select * from tableA where foo like '%%%'

This query seems to work, both on mssql and oracle, when foo is of string type (varchar, etc.) but it fails when foo is numeric.

Any idea what it means?

EDIT: sorry about the typo in original question, the query uses the LIKE operator.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:42:04+00:00Added an answer on May 13, 2026 at 2:42 pm

    Turns out in mysql it matches everthing:

    mysql> create database foo;
    Query OK, 1 row affected (0.06 sec)
    
    mysql> use foo;
    Database changed
    
    mysql> create table foo ( bar char(20) );
    Query OK, 0 rows affected (0.06 sec)
    
    mysql> desc foo;
    +-------+----------+------+-----+---------+-------+
    | Field | Type     | Null | Key | Default | Extra |
    +-------+----------+------+-----+---------+-------+
    | bar   | char(20) | YES  |     | NULL    |       |
    +-------+----------+------+-----+---------+-------+
    1 row in set (0.00 sec)
    
    mysql> insert into foo values ('endwith%');
    Query OK, 1 row affected (0.05 sec)
    
    mysql> insert into foo values ('%startwith');
    Query OK, 1 row affected (0.00 sec)
    
    mysql> insert into foo values ('cont%ins');
    Query OK, 1 row affected (0.00 sec)
    
    mysql> insert into foo values ('doesnotcontain');
    Query OK, 1 row affected (0.00 sec)
    
    mysql> select * from foo where bar like '%%%';
    +----------------+
    | bar            |
    +----------------+
    | endwith%       |
    | %startwith     |
    | cont%ins       |
    | doesnotcontain |
    +----------------+
    4 rows in set (0.00 sec)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I kind of not familiar with all that JS stuff and everything but today
I'm not massively familiar with this design but I am hoping to get some
I guess this question will sound familiar, but I am yet another programmer baffled
This is hopefully an easy question to answer for someone familiar with Mozilla, but
Maybe the question is familiar but I need an explanation in this case. Let's
I've written a query to read some stuff from Active Directory, but the result
I'm familiar with packages from e.g. Java and Lisp, but what I'm seeing in
I'm not familiar with this programming language,in PHP it's getcwd() .
Given this very familiar model of prototypal construction: function Rectangle(w,h) { this.width = w;
New to this library (no more familiar with BeautifulSoup either, sadly), trying to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.