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 7991055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:11:09+00:00 2026-06-04T13:11:09+00:00

I want to run a SELECT … LIKE query in SQLite that is case-sensitive.

  • 0

I want to run a SELECT ... LIKE query in SQLite that is case-sensitive. But I only want this one query to be case sensitive, and nothing else.

I know there is

PRAGMA case_sensitive_like = boolean;

But that seems to change all LIKE queries.

How can I enable case-sensitive LIKE on a single query?

Examples:
I want a query for “FuN” to match “blah FuN blah”, but not “foo fun bar”.

(This is running under PHP using PDO)

I might be able to toggle that on, then off after the query but I can concerned about the repercussions that may have (efficiency etc). Is there any harm?

I don’t have write access to the database.

(This is under Windows Server 2008)

I also tried SELECT id, summary, status FROM Tickets WHERE summary COLLATE BINARY LIKE '%OPS%'; but that did not do a case-sensitive SELECT, it still returned results returns like laptops.

  • 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-06-04T13:11:10+00:00Added an answer on June 4, 2026 at 1:11 pm

    Why not go the simple way of using

    PRAGMA case_sensitive_like = true/false;
    

    before and after each query you want to be case sensitve? But beware- case sensitivity does only work for ASCII characters, not Unicode which makes SQlite not fully UC-compliant at this time.

    Alternatively, SQlite allows applications to implement the REGEXP operator which might help according to http://www.sqlite.org/lang_expr.html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to run a query like this: SELECT * FROM Studio WHERE Id
In hibernate I want to run this JPQL / HQL query: select new org.test.userDTO(
PROBLEM: I want to run a query which would trigger something like select *
I want to run this query: SELECT DISTINCT ON (address_id) purchases.address_id, purchases.* FROM purchases
I want to do this: run a command capture the output select a line
I want to run an INSERT ... SELECT Manual query to insert 1 selected
I want to run select query on multiple table and combine result. for example
I want to run the following query :: SELECT S.* FROM sys.dm_exec_requests S JOIN
If I want to run an SQL statement like SELECT integername from tblintegerlist where
I have a custom SQL query I want to run, but the user can

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.