General discussion
March 5, 2003 at 03:57 AM
dksmith

Need Help with SQL

by dksmith . Updated 23 years, 5 months ago

I am a new SQL and need some help.

I have two tables in two databases. I need to pull six fields from table A and insert them into table B (can do that — Insert Into).

My limitation is when Table B has seven fields because the table has a default primary key field of ID (int). When I copy over the six fields from A into B, I need the ID field to be given a unique (preferably sequential) int value and the additional six values to fall into place.

insert into ‘TABLE B’ SELECT Field1, Field2, Field3, Field4, Field5, Field6 FROM ‘Table A’

What do I do with the ID field that needs to be unique?

Any suggestions?

email me with questions at davidksmith@hotmail.com
thanks.

This discussion is locked

All Comments