Jan 15, 2004 #1 chendes Technical User Dec 4, 2003 12 GB Using SQL what is the quickest way of copying a table
Jan 15, 2004 1 #2 jrbarnett Programmer Jul 20, 2001 9,645 GB If you mean you want to duplicate a table and its contents, try select * into newtable from table then you need some VBA code to set up primary and foreign keys and referential integrity. John Upvote 0 Downvote
If you mean you want to duplicate a table and its contents, try select * into newtable from table then you need some VBA code to set up primary and foreign keys and referential integrity. John
Jan 15, 2004 Thread starter #3 chendes Technical User Dec 4, 2003 12 GB Thats fantastic. Is it possible to do a select into an exsisting table as apposed to create a new table? Upvote 0 Downvote
Thats fantastic. Is it possible to do a select into an exsisting table as apposed to create a new table?
Jan 15, 2004 #4 jrbarnett Programmer Jul 20, 2001 9,645 GB Yes: Insert Into Tablename (Field1, Field2, Field3) Select Field4, Field5, Field6 From Oldtablename Remember that the primary key restrictions will be enforced, and you can restrict the records that can be copied using a Where clause on the select. John Upvote 0 Downvote
Yes: Insert Into Tablename (Field1, Field2, Field3) Select Field4, Field5, Field6 From Oldtablename Remember that the primary key restrictions will be enforced, and you can restrict the records that can be copied using a Where clause on the select. John