mysql错误用法insert into where
生活随笔
收集整理的這篇文章主要介紹了
mysql错误用法insert into where
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
mysql中給表中插入數(shù)據(jù),一般使用insert into。
但是在插入數(shù)據(jù)時(shí),有時(shí)會(huì)根據(jù)條件來(lái)插入數(shù)據(jù),比如insert into t_person(num,name) values(1,'lily') where true;
會(huì)提示語(yǔ)法錯(cuò)誤。把where true去除掉,可以正確執(zhí)行。因?yàn)橐话愕膇nsert into 語(yǔ)句是不能帶where條件的。
可以insert into 表名(, , , ,) select *from 表名 where條件表達(dá)式
總結(jié)
以上是生活随笔為你收集整理的mysql错误用法insert into where的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 11G中自动收集统计信息
- 下一篇: windows下qt5 kinect 2