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 ;
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!