Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 copy table schema

Author  Topic 

tinomesa
Starting Member

2 Posts

Posted - 2003-08-14 : 13:27:17
Greetings,

I am using a select into statement to copy the data fileds from a master table to a user table, this works well but I now need help figuring out how to copy the table schema from one table to another.


Thanks,

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-08-14 : 13:51:49
What is the master table? Maybe just an ordinary table?
Go to Top of Page

tinomesa
Starting Member

2 Posts

Posted - 2003-08-14 : 15:35:42
Yes, it is a table I use to create other tables as users upload data.

thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-14 : 15:51:11
You can generate the script in Enterprise Manager. Just go to your table in EM, right click on it, select all tasks, then generate sql script. Go to each tab and select which options that you want to script out.

Tara
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-08-14 : 15:56:24
I thought it is up to MS Access only...
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-14 : 16:50:43
Ah, didn't realize it was an MS Access question.

Tara
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-08-15 : 06:50:39
What do you mean by "copy the table schema from one table to another"? Do you mean that you want to copy only the table structure without the data? Then try this:

SELECT *
INTO SlaveTable
FROM MasterTable
WHERE 1=2

Owais
Go to Top of Page
   

- Advertisement -