Reply to Re: rename all tables in database newbie question

Your name:

Reply:


Posted by 2525 on 07/12/07 22:44

In article <5fngvtF3cuhupU1@mid.individual.net>,
paul.lautman@btinternet.com says...
> 2525@virgin.co.uk wrote:
> > I'm not very familiar with SQL - Using mySQL
> >
> > I need to add or remove prefixes from table names - can anyone tell me
> > an SQL (or PHP for that matter) way to do this please?
> >
> > I can't seem to find a way to do it.
> >
> > thanks
> >
> > cleo
>
> Your question does not make sense. Maybe some examples of what you are
> trying to say may help.
>
>
>

I need to rename all the tables in my databases by changing the first few
characters of each table name:

eg
my_email to email
my_zips to zip

There are many tables and hand changing one at a time is not feasible.
I can't find an SQL statement that will do something like

rename TABLE * where TABLENAME = my_* TO *

ie dropping the my_ part.

How can I do this either with SQL (prefered) or PHP if needs be.

cleo

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация