By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,757 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Script creation from existing table

P: 32
Hello All,

I have a table called employees in my mdb file. Is there any way to create a script for table creation from this existing table. Something like reverse engineering.
Is there an option where we can select a table and then say "generate script"

Thanks for your help
Nanda
Aug 31 '07 #1
Share this Question
Share on Google+
2 Replies


Jim Doherty
Expert 100+
P: 897
Hello All,

I have a table called employees in my mdb file. Is there any way to create a script for table creation from this existing table. Something like reverse engineering.
Is there an option where we can select a table and then say "generate script"

Thanks for your help
Nanda
the simple way
Expand|Select|Wrap|Line Numbers
  1. SELECT * INTO YourtNewTableName
  2. FROM YourExistingTableName
  3. WHERE FALSE;
or if you like ....the impossible select statement

Expand|Select|Wrap|Line Numbers
  1. SELECT * INTO YourNewTableName
  2. FROM YourExistingTableName
  3. WHERE ((1=2));
Jim
Aug 31 '07 #2

ADezii
Expert 5K+
P: 8,669
Hello All,

I have a table called employees in my mdb file. Is there any way to create a script for table creation from this existing table. Something like reverse engineering.
Is there an option where we can select a table and then say "generate script"

Thanks for your help
Nanda
I am a little confused on exactly what you are requesting. From a Table, in this case employees, do you want to generate the code to recreate this same Table exactly? If this is the question, the answer is yes it can be done, but it would be a complex undertaking recreating the Fields, Indexes, Relationships, Primary Key, Data Types and Sizes of the Fields, Validation Rules, Properties such as Required, Allow Nulls, etc., etc., etc.,....Just for curiosity, why would you want to do this?
Aug 31 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.