mysql中给表中插入数据,一般使用insert into。

但是在插入数据时,有时会根据条件来插入数据,比如insert into t_person(num,name) values(1,'lily') where true;

会提示语法错误。把where true去除掉,可以正确执行。因为一般的insert into 语句是不能带where条件的。

可以insert into 表名(, , , ,) select *from 表名 where条件表达式

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2021-09-02
  • 2022-12-23
  • 2021-09-13
  • 2022-03-05
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
相关资源
相似解决方案