?
Solved

Show tables NOT like

Posted on 2006-06-24
3
Medium Priority
?
1,164 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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 video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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…
Suggested Courses

649 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