Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Hiep Nguyen (hiepee.ucr.edu)
Date: Thu Apr 03 2008 - 09:23:27 CDT
hi all, i have a question on insert ... select statement.
fld1 int primary key auto_increment not null
how do i construct my select statement so that fld1 is auto increment?
insert into tbl_1(fld1,fld2,fld3) select xxx, fld_b, NOW() from tbl_2
where fld_a = '5';
what should 'xxx' be???
my goal is to get
fld1 = auto increment
fld2 = fld_b
fld3 = NOW()
i saw someone used '1', other used null for xxx. i'm confused.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql