1.查询:select * from table_name where 条件语句;
SELECT * from sms_runwater WHERE message LIKE "%自有支付%" ORDER BY send_date DESC;
2.插入:insert into table_name (column1,column2...)values(values1,values2,....);
3.修改数据: update table_name set column1=**,column2=** where 条件语句;
4.修改数据表名:alter table able_name rename to new_table_name;
5.修改列名:alter table table_name rename column column_name to new_column_name;
6.修改列的数据类型 :alter table table_name modify column_name new_datatype;
7.插入列:alter table table_name add column_name datatype;
8.删除列 :alter table table_name drop column column_name;
9.删除数据:
delete from table_name where 条件语句; 删除数据
delete from table table_name; 删除表下的全部数据,保留表结构
10.删除表/库:
drop table table_name 删除表(表的结构、属性以及索引也会被删除)
drop database database_name 删库跑路~~~~~慎用
truncate table table_name 仅删除表格中的数据