Mysql的增刪改查語(yǔ)句簡(jiǎn)單實(shí)現(xiàn)
增加記錄:
insert into tablename(...) values(...)//如果增加的記錄包括所有的列,則不需要寫(xiě)數(shù)據(jù)列表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 ;
刪除整個(gè)表:
drop table tablename ;
添加列:
alter table tablename add column columnname columntype ... ;
刪除列:
alter table tablename drop column columnname ;
感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!
新聞熱點(diǎn)
疑難解答
圖片精選