How to insert with where clause

后端 未结 4 1423
时光取名叫无心
时光取名叫无心 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:18

    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.

提交回复
热议问题