Using access, you can do the same thing that David suggested: Select * into newtable from oldtable
But you may still have to use the ALTER TABLE command to set primary keys. Matthew Small IT Supervisor Showstopper National Dance Competitions 3660 Old Kings Hwy Murrells Inlet, SC 29576 843-357-1847 http://www.showstopperonline.com -----Original Message----- From: Chris Tifer [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 1:15 PM To: ActiveServerPages Subject: Re: Cloning Tables with SQL I'm pretty sure when he said "on the fly", he meant something programmatic. Chris Tifer ----- Original Message ----- From: "Daniel Field" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Thursday, September 12, 2002 7:16 AM Subject: RE: Cloning Tables with SQL > If its a access DB then just open the DB and copy and paste the table. > > Dan > > -----Original Message----- > From: Andy Hayman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 15:18 > To: ActiveServerPages > Subject: RE: Cloning Tables with SQL > > > At the mo it is Access, so I could use > > Create to create the table and set the structure > Then select into to fill it? > > Excellent > > Thanx > > > -----Original Message----- > > From: David L. Penton [mailto:[EMAIL PROTECTED]] > > Sent: 12 September 2002 14:49 > > To: ActiveServerPages > > Subject: RE: Cloning Tables with SQL > > > > > > With MSSQL, use DTS > > > > You can also do: > > > > SELECT * INTO newTable FROM oldTable > > > > in many RDBMSes > > > > You can also generate the CREATE table and INSERT statements > > (using a language of your choice) > > > > David L. Penton, Microsoft MVP > > JCPenney Application Specialist / Lead > > "Mathematics is music for the mind, and Music is Mathematics > > for the Soul. - J.S. Bach" [EMAIL PROTECTED] > > > > Do you have the VBScript Docs or SQL BOL installed? If not, > > why not? VBScript Docs: http://www.davidpenton.com/vbscript > > SQL BOL: http://www.davidpenton.com/sqlbol > > > > > > -----Original Message----- > > From: Andy Hayman [mailto:[EMAIL PROTECTED]] > > > > Hey all > > > > Is it possible to "clone" or copy an existing table, basicly > > I want to copy a table with its structure and data on the > > fly, I know I can INSERT a table then copy the data by > > reading it then writing it but is there a copy or clone command? > > > > > > --- > > Andy Hayman > > Kensington Computers > > Internet & Computers Systems Consultant > > Web <http://www.ken.co.uk> > > Email <mailto:[EMAIL PROTECTED]> > > Telephone 020 7835 1282 > > Fax: 020 7373 6900 > > > > > > --- > > You are currently subscribed to activeserverpages as: > > [EMAIL PROTECTED] To unsubscribe send a blank email to > > %%email.unsub%% > > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to > %%email.unsub%% > > _____________________________________________________________________ > This e-mail has been scanned for viruses by the WorldCom Internet Managed > Scanning Service - powered by MessageLabs. For further information visit > http://www.worldcom.com > > > > _____________________________________________________________________ > This e-mail has been scanned for viruses by the WorldCom Internet Managed Scanning Service - powered by MessageLabs. For further information visit http://www.worldcom.com > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
