Solved

Show tables NOT like

Posted on 2006-06-24
3
1,099 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
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 500 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now