Hi,

I know I can do

insert into mytable select * from some_other_table;

but I can't find the right syntax to use with either an update or replace. Ideally I'd like to do something like this:

update mytable set mytable.a=(select other_table.some_column from other_table where other_table.some_column=mytable.a+1) where mytable.b=6;

The goal is to set a column in a to a value based on a column in another table when b in the same record has a specific attribute.

Can I do this?

Thanks,

bob




====================================================================== Bob Ramsey Applications Development & Support II ph: 1(319)335-9956 187 Boyd Law Building fax: 1(319)335-9019 University of Iowa College of Law mailto:[EMAIL PROTECTED] Iowa City, IA 52242-1113 For Hardware and Software questions, call 5-9124 ======================================================================


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to