Re: Copying a Table
Greetings... It is possible. Say for eg. If you want to copy the structure and data of the db table in mysql table. you can use the following statement - create table `db_copy` ( primary key ( Host, Db, User ) ) select * from `db` If you cant to copy only the structure then you can use a query like this - create table `db_copy` ( primary key ( Host, Db, User ) ) select * from `db` where 1 = 0 Hope It helps Insane http://www.webyog.com/sqlyog The definative GUI client for MySQL - Original Message - From: "Shaun Bramley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 28, 2002 10:48 PM Subject: Copying a Table > Hello all, > > I have yet to find this bit of information within the documentation. Is it > possible to copy the contents of a table? If so how? > > Shaun > mysql, query > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Copying a Table
To where? Another table? More information is required. - Original Message - From: "Shaun Bramley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 28, 2002 1:18 PM Subject: Copying a Table > Hello all, > > I have yet to find this bit of information within the documentation. Is it > possible to copy the contents of a table? If so how? > > Shaun > mysql, query > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Copying a Table
select * from table1 insert into table2 both tables need the same structure Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net tel. 0121-242-1473 --- -Original Message- From: Shaun Bramley [mailto:[EMAIL PROTECTED]] Sent: 28 September 2002 17:19 To: [EMAIL PROTECTED] Subject: Copying a Table Hello all, I have yet to find this bit of information within the documentation. Is it possible to copy the contents of a table? If so how? Shaun mysql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Copying a Table
Check out http://www.mysql.com/doc/en/mysqldump.html that should help you. John Coder On Sat, 2002-09-28 at 13:18, Shaun Bramley wrote: > Hello all, > > I have yet to find this bit of information within the documentation. Is it > possible to copy the contents of a table? If so how? > > Shaun > mysql, query > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Copying a Table
Hello all, I have yet to find this bit of information within the documentation. Is it possible to copy the contents of a table? If so how? Shaun mysql, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Copying a table structure with constraints intact
Hi There; I have some template tables in my SQL database that I was hoping to copy to make the production tables, but I have noticed that the constraints do not copy when I create the production table using a select statement. Dows anyone know of a way to copy the table and have the constraints copy with the structure? Mike - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
copying a table
I too am having trouble with the simple task of copying a table. I am using 3.22.23b. I wanted to use the create with insert but was told this isn't supported by 3.22. So i have created the new table and figured I would use an insert. i can't get this to work either. insert into NewTable (field1,field2,field3) values select field1,field2,field3 from OldTable I have tried quite a few variations on this and still can not get it to work. Does someone know the syntax for 3.22.23 so I don't have to alter this data one by one? Thanks, Nancy __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php