mysql错误用法insert into where

时间:2024-01-08 19:34:50

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

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

会提示语法错误。把where true去除掉,可以正确执行。

看来是insert into 语句后不能直接跟where语句了。