Re: Copying a Table

2002-09-28 Thread Insanely Great

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

2002-09-28 Thread Arthur Fuller

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

2002-09-28 Thread Peter Lovatt

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

2002-09-28 Thread John Coder

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




RE: Copying a table structure with constraints intact

2002-08-02 Thread Mike Hillyer

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