How to insert with where clause

后端 未结 4 1413
时光取名叫无心
时光取名叫无心 2020-12-07 02:32

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\' ;
         


        
4条回答
  •  太阳男子
    2020-12-07 03:09

    You should rather use UPDATE, if you want to change the value of the field in records you select using the WHERE clause.

提交回复
热议问题