| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Johan De Meersman | Date: | April 4 2012 10:16am |
| Subject: | Re: create multiple tables in a single query | ||
| View as plain text | |||
----- Original Message ----- > From: "joe j" <joe.stata@stripped> > > So what I am trying to get is a script that runs through a list of > country names (US, UK, NL, etc) and create tables for each one of > them as above. Is this feasible in MySql? You can't create multiple tables with one statement; but you *can* put multiple statements on a single line. However, this does nothing for performance - nor readabiltiy, for that matter :-) You could (on *nix) write a simple commandline loop for it, I suppose. Something along the lines of for x in UK US BE FR; do mysql -e "create table ${x}_table_new as select blahblahblbah"; done -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel
| Thread | ||
|---|---|---|
| • create multiple tables in a single query | joe j | 3 Apr |
| • Re: create multiple tables in a single query | hsv | 4 Apr |
| • Re: create multiple tables in a single query | Rick James | 4 Apr |
| • Re: create multiple tables in a single query | Johan De Meersman | 5 Apr |
| • Re: create multiple tables in a single query | Johan De Meersman | 4 Apr |
| • Re: create multiple tables in a single query | joe j | 4 Apr |
| • Re: create multiple tables in a single query | joe j | 4 Apr |
| • Re: create multiple tables in a single query | Johan De Meersman | 5 Apr |
| • Re: create multiple tables in a single query | joe j | 5 Apr |
| • Re: create multiple tables in a single query | joe j | 5 Apr |
| • Re: create multiple tables in a single query | Johan De Meersman | 6 Apr |
| • Re: create more tables in a single query | hsv | 5 Apr |
| • Re: create multiple tables in a single query | Jan Steinman | 5 Apr |
