?
Solved

Show tables NOT like

Posted on 2006-06-24
3
Medium Priority
?
1,151 Views
Last Modified: 2008-01-09
ok

I'm NOT using MySQL 5

I need to exclude 1 table from a list of about 50. to get my list I'm using "show tables DBNAME"

when I tried the 'not like' it didn't work (if i use ust like then it does show the table I'm trying to exclude)

Can I use like 'table1' OR like 'table2' ??

any ideas ?

TIA
0
Comment
Question by:abenbow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:abenbow
ID: 16974913
OR LIKE doesn't work
0
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 16977016
show tables will not support 'not like' syntax. You can use the information schema, which holds a list of all the user tables

SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'DBNAME'  and table_name != 'skip_this table;'
0
 
LVL 30

Accepted Solution

by:
todd_farmer earned 2000 total points
ID: 16979827
There isn't any syntax that I am aware of that will let you show all tables but hide a specific one.  The suggestion to use INFORMATION_SCHEMA is valid - but only if you are using MySQL 5.0 (which you already said you were not).
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question