o0O0o.o0O0o
05-22-2009, 01:44 AM
hi
is it possible to use join in update query or insert query , where i want to inser t some data from table B to Table A e.g
UPDATE table A , Table B ,
SET A.task_id = B.task_id
where B.category_id in (select category_id from Table C where userid = 1)
UPDATE table A , Table B ,
SET A.task_id = B.task_id
inner join Table C on (B.category_id = C.category_id and C.user_id = 1)
Table C contains all user categories
Table B contains all tasks for all categories
Table A contains all user tasks which are in all user categories
is it possible to use join in update query or insert query , where i want to inser t some data from table B to Table A e.g
UPDATE table A , Table B ,
SET A.task_id = B.task_id
where B.category_id in (select category_id from Table C where userid = 1)
UPDATE table A , Table B ,
SET A.task_id = B.task_id
inner join Table C on (B.category_id = C.category_id and C.user_id = 1)
Table C contains all user categories
Table B contains all tasks for all categories
Table A contains all user tasks which are in all user categories