copy fields from one table to the field structure of another table

E

Educo Gent

How can I copy fields (not records) from one table to the field structure of
another table (in the same database on a sql server 2000)? So that I have
not to re-type the name and properties of the fields and to be sure the name
and properties of the fields are the same in both tables.

Thanks,
Hugo
 
J

Jim Rand

Here is one way.

From SQL Enterprise Manager, right click the table. Select all tasks,
generate sql script.

In the options tab, check script indexes, triggers, and primary keys. For
the file format, choose Windows text (ANSI)

Press OK, save the sql file and edit it with notepad to remove name
conflicts. Run the resulting SQL from query analyzer.
 
S

Sylvain Lafontaine

If you are not interested with things like Indexes, then a simple Copy&Paste
in design mode will fill the bill. To activate the Past, make sure to
select a row and not only a cell.

S. L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top