mysql和oracle的delete from

 這期需要將oracle遷移到mysql,所以,會將dao層的工程都換成mysql的寫法。

以前的寫法:

@Delete("delete from test t where t.ID=#{id}")
void del(long id);

delete from test t where t.ID=#{id} 在oracle中是ok的,但是在mysql中,是報錯的。需要將它改爲:

delete from test  where  ID=#{id}  或者是 delete t.* from test t where t.ID=#{id}

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章