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

  • Home
  • SEARCH
  • 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 6185275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:41:00+00:00 2026-05-24T01:41:00+00:00

In Oracle SQL, I wish to find all user names,whose Last name contains some

  • 0

In Oracle SQL, I wish to find all user names,whose Last name contains some specific Characters like (‘Z’,’X’,’D’,’F’) Or contains Some Range of Characters from ‘A-F’.

I tried this:

 SELECT user_last_name
    FROM   userbase
    WHERE  user_last_name LIKE '%A%' OR user_last_name LIKE '%F%' .

So How can I go about it.

And I written facebook in question although its not directly related to it,because,its the example given by my sir.

UPDATE: I tried the above code,it works with so many OR’s, but How can we define some range to search for like IN(‘Z’,’X’,’D’,’F’) or IN (‘A-F’)

  • 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-24T01:41:01+00:00Added an answer on May 24, 2026 at 1:41 am

    If you are using a recent version of Oracle, you should be able to use regular expressions

    SQL> ed
    Wrote file afiedt.buf
    
      1   select first_name, last_name
      2     from employees
      3*   where regexp_like( last_name, 'Z|X|D|[A-F]' )
    SQL> /
    
    FIRST_NAME           LAST_NAME
    -------------------- -------------------------
    Ellen                Abel
    Sundar               Ande
    Mozhe                Atkinson
    David                Austin
    Hermann              Baer
    Shelli               Baida
    Amit                 Banda
    Elizabeth            Bates
    Sarah                Bell
    David                Bernstein
    Laura                Bissot
    Harrison             Bloom
    Alexis               Bull
    Anthony              Cabrio
    Gerald               Cambrault
    Nanette              Cambrault
    John                 Chen
    Kelly                Chung
    Karen                Colmenares
    Curtis               Davies
    Lex                  De Haan
    Julia                Dellinger
    Jennifer             Dilly
    Louise               Doran
    Bruce                Ernst
    Alberto              Errazuriz
    Britney              Everett
    Daniel               Faviet
    Pat                  Fay
    Kevin                Feeney
    Jean                 Fleaur
    Tayler               Fox
    Adam                 Fripp
    Samuel               McCain
    Allan                McEwen
    Donald               OConnell
    Eleni                Zlotkey
    
    37 rows selected.
    

    If you want the search to be case-insensitive

    SQL> ed
    Wrote file afiedt.buf
    
      1   select first_name, last_name
      2     from employees
      3*   where regexp_like( last_name, 'Z|X|D|[A-F]', 'i' )
    SQL> /
    
    FIRST_NAME           LAST_NAME
    -------------------- -------------------------
    Ellen                Abel
    Sundar               Ande
    Mozhe                Atkinson
    David                Austin
    Hermann              Baer
    Shelli               Baida
    Amit                 Banda
    Elizabeth            Bates
    Sarah                Bell
    David                Bernstein
    Laura                Bissot
    Harrison             Bloom
    Alexis               Bull
    Anthony              Cabrio
    Gerald               Cambrault
    Nanette              Cambrault
    John                 Chen
    Kelly                Chung
    Karen                Colmenares
    Curtis               Davies
    Lex                  De Haan
    <<snip>>
    Matthew              Weiss
    Jennifer             Whalen
    Eleni                Zlotkey
    
    93 rows selected.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To find a specific date after some given date in SQL oracle. Example: Date
I am using Oracle SQL (in SQLDeveloper, using the SQL Worksheet). I would like
I'm using Oracle SQL Developer. I'd like to key in dates with hours and
I am using Oracle SQL and I want to group some different rows that
I would like to convert an Oracle SQL query into SQL server query. But
How do I query the database name in Oracle SQL Developer? I have tried
[Previous essay-title for question] Oracle SQL: update parent table column if all child table
I'm trying to convert some Oracle SQL queries to work with (in theory) any
Oracle SQL Developer complains about next SQL though I can't seem to find the
How to increase buffer size in Oracle SQL Developer to view all records (there

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.