Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show tables like is weird

Status
Not open for further replies.

bonosa

Programmer
May 19, 2004
76
US
I have a table called pru_1_a, and one called pru_10_b. If I say

show tables like "pru_1_%" I get both listed. This is odd. What am I doing wrong?
Thanks,
sb
 
I am in trouble!! My tables are labelled as pru_1_abc, pru_2_abc etc and I have based my searches on looking for the all tables that have "_1_" in them or "_2_". So does this mean that I should change the naming system? I looked justnow at and I see that '_" is illegal. So i am off to change my naming system...

Thanks,
sb
 
Oh no. I thought it was "_" not allowed so I tried "-" but its not ok with that. So if I stay with my "_" how do I search for files like "_a_" where the underscore doesnt mean anything else but underscore If its not good what can I use? I need to sandwich that central character - what can I use?
thanks in advance,
sb
 
To make a _ be treated as an ordinary character, escape it with a backslash:[tt]
LIKE "pru\_1\_%
 
Many thanks. I didnt quite grasp that from the documentation.
Appreciate the help,
sb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top