I am using the following query to insert values into one field in table A.
insert into A (name) values (\'abc\') where A.id=B.code and B.dept=\'hr\' ;
the insert part should be ok
insert into A (name) values ('abc')
it really depends on what you are trying to achieve with the where clause and the B table reference.