[Pugged] MySql Primary Keys
Dave J. Hala Jr.
ciapug@ciapug.org
14 Jan 2003 10:47:11 -0600
Whoohoo!!! It works!!!
Thanks!!
On Mon, 2003-01-13 at 20:53, Tim Perdue wrote:
> Dave J. Hala Jr. wrote:
> > I'm using the following statement to move some records from one table
> > to another:
> >
> > INSERT INTO target_table SELECT * FROM source_table where LHP = "A";
>
> You know one thing you can do is:
>
> INSERT INTO target_table (field2,field3,field4) SELECT
> field2,field3,field4 FROM source_table where LHP = "A";
>
> Notice how you are leaving out the pkey? Mysql will autnumber that field
> on its own.
>
> Tim
>
> _______________________________________________
> Ciapug mailing list
> Ciapug@ciapug.org
> http://cialug.org/mailman/listinfo/ciapug
--
"...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and
the Ugly)"
OSIS
Dave J. Hala Jr.
641.485.1606