469,631 Members | 976 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Copy A Table Into The Same Database

How do you copy a table into the same database and give it a new name? For
example, copy "MyTable" and give the copy the name "MyNewTable".


Nov 13 '05 #1
4 2839
Create a "make table" query:

Open a new query in the query designer.

Drag your source table into the top half of the designer.

Drag all the fields you like from the old table def to the query grid.

If necessary, set your filters and sorting to taste and run it.

Run as a SELECT query first to be sure you like the results.

Change the query (using the tool on the toolbar) to a Make-Table query,
and enter the new table name.

Run it.

You'll still have to define primary key and indexes, if any, in the
table manually.

Don't forget to set permissions on the new table before deploying for
other users.


Nov 13 '05 #2
If you want an exact duplicate and are not doing this with code, select
the table and do ctrl-C then a ctrl-V and give the table a name.


Nov 13 '05 #3
Even better! Thanks, Bob!

Nov 13 '05 #4
Even better! Thanks, Bob!

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by sqlnewbie | last post: by
1 post views Thread by Jeroen Pot | last post: by
7 posts views Thread by lgbjr | last post: by
4 posts views Thread by frederic.germaneau | last post: by
4 posts views Thread by JIM.H. | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.