mysql错误用法insert into where
生活随笔
收集整理的這篇文章主要介紹了
mysql错误用法insert into where
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
mysql中給表中插入數據,一般使用insert into。
但是在插入數據時,有時會根據條件來插入數據,比如insert into t_person(num,name) values(1,'lily') where true;
會提示語法錯誤。把where true去除掉,可以正確執行。因為一般的insert into 語句是不能帶where條件的。
可以insert into 表名(, , , ,) select *from 表名 where條件表達式
總結
以上是生活随笔為你收集整理的mysql错误用法insert into where的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 11G中自动收集统计信息
- 下一篇: MySQL root密码重置 报错:m