Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MAKING TWO OR MORE TABLES FROM ONE WITH SQL

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
I have an access 2000 database with a table having 123 records and approx 255 fields. Access is very slow. I am wanting to break the table into two or more smaller tables splitting the fields between them. I am hoping this will provide faster access using a JOIN statement in SQL to query the tables.

How do I split this table using SQL. I have looked at the ALTER TABLE, CREATE TABLE, and UNION statements but none seem to apply. Is there a way ???

Also, how do I count and/or list the fields in a table using SQL???

I am assumeing that SQL can do everything.

Thanks, TNN Tom
TNPAYROLL@AOL.COM [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
You should use CREATE TABLE to create a table with only the desired fields, then use INSERT SELECT to move the data. I would create two new tables rather than delete the fields from the existing one.

Joins are slower.
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top