Mysql的增刪改查語句簡單實現
更新時間:2017年04月27日 11:37:07 投稿:lqh
這篇文章主要介紹了Mysql的增刪改查語句簡單實現的相關資料,需要的朋友可以參考下
Mysql的增刪改查語句簡單實現
增加記錄:
insert into tablename(...) values(...) //如果增加的記錄包括所有的列,則不需要寫數據列表 insert into tablename values(...)
刪除記錄:
delete from tablename where condition ;
修改記錄:
update tablename set xx=xx , xx=xx... where condition ; alter table tablename set xx=xx , xx=xx... where condition ;
查詢記錄:
select (...) from tablename where condition ; select * from tablename where condition ;
刪除整個表:
drop table tablename ;
添加列:
alter table tablename add column columnname columntype ... ;
刪除列:
alter table tablename drop column columnname ;
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
相關文章
Mysql事物鎖等待超時Lock wait timeout exceeded;的解決
本文主要介紹了Mysql事物鎖等待超時Lock wait timeout exceeded;的解決,文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2022-03-03

