Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Android Sql Like

I'm using SQLite for my database and what I need is get the list of the username based on a specific string

My query is

SELECT * FROM username_table WHERE username like 'john[^0-9]%' 

Results are:

john1, johnny12, john123, johnatan12 ... (Except john I dont know why)

What i need is only john or john with any number besides him

Expected Result

john, john012, john1245, john1, john46...

Thank you

Answer*

Draft saved
Draft discarded
Cancel
2
  • it still the same it renders johnny01, johnatan12 etc Commented Feb 27, 2015 at 18:07
  • 0 Rows returned from: SELECT * FROM username_table WHERE username like 'john?[0-9]c/o' Commented Feb 27, 2015 at 19:12

default

AltStyle によって変換されたページ (->オリジナル) /