[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2004 ]

Re: [edlug] MySQL copy table structure



And you can also just copy the data folder and put it
where you want. I've moved MySQL databases from Linux 
to Windoze and back with no problems encountered.

George in Oxford

 --- kyle <kyle@xxx.xxx.xxx> wrote: > 
> El mar, 02-03-2004 a las 14:56, Catriona & Anand
> escribió:
> > Hello all,
> > 
> > I am new to MySQL and am picking up the syntax as
> I go along. Right now, I 
> > need to create a table with the same structure as
> an existing one. The manual 
> > does not seem to offer a way to do this. In dBase
> there was a "COPY 
> > STRUCTURE" command, but I can't find an
> equivalent.
> 
> create table newtable like oldtable :-)
> 
> 
> http://www.mysql.com/doc/en/CREATE_TABLE.html
> 
> """In MySQL 4.1, you can also use LIKE to create a
> table based on the
> definition of another table, including any column
> attributes and indexes
> the original table has:
> 
> CREATE TABLE new_tbl LIKE orig_tbl;
> 
> CREATE TABLE ... LIKE does not copy any DATA
> DIRECTORY or INDEX
> DIRECTORY table options that were specified for the
> original table."""
> 
> 
> 
> -- 
> Backup not found: (A)bort, (R)etry, (S)uicide?
> 
> -
>
----------------------------------------------------------------------
> You can find the EdLUG mailing list FAQ list at:
> http://www.edlug.org.uk/list_faq.html 

=====
George Pitcher

Technical Manager, HERON, Ingenta, Oxford
01865-799051 ... fmdev@xxx.xxx.xxx


	
	
		
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html
-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html



This archive is kept by wibble@morpheux.org.DONTSPAMME
homepage