Page 1 of 1
insert statment
Posted: Fri Jun 05, 2009 3:44 pm
by amao
dear all
I need to make insert rows in this from
ID static full
1 A A1
2 A A2
the first column ID second one static value equal "A" third column static value+ID
so please how to make the third value
Re: insert statment
Posted: Fri Jun 05, 2009 4:16 pm
by mikemike
Code: Select all
UPDATE TABLE SET `full`=CONCAT(`static`, `ID`)
Re: insert statment
Posted: Sat Jun 06, 2009 4:49 am
by amao
mikemike wrote:Code: Select all
UPDATE TABLE SET `full`=CONCAT(`static`, `ID`)
does it mean I will make concat with every insert

Re: insert statment
Posted: Sat Jun 06, 2009 10:31 am
by mikemike
every entry in the table. If you don't want to do that then stick a WHERE clause in
Re: insert statment
Posted: Wed Jul 01, 2009 10:07 am
by amao
mikemike wrote:Code: Select all
UPDATE TABLE SET `full`=CONCAT(`static`, `ID`)
I try to this but did not pass
UPDATE TABLE SET `full`=CONCAT(`static`, `ID`) where Id=Max(id)
It give me this error #1111 - Invalid use of group function
any suggestion please