【备忘】mysql常用操作汇总

1、增删改查

//   插入一条数据
insert into tableName values('liu','bei')

//   删除一条数据
delete from tableName where last = 'liu'

//   更新一条数据
update tableName set first = 'bei' where first = 'finder'

//  查询一条数据
select * from `info` where first = 'finder'

2、查看三种MySQL字符集的方法

//  查看MySQL数据库服务器和数据库MySQL字符集
show variables like '%char%';

//  查看MySQL数据表(table)的MySQL字符集
show table status from databaseName like '%tableName%';

//查看MySQL数据列(column)的MySQL字符集
show full columns from tableName;
原文地址:https://www.cnblogs.com/liubei/p/sqlCommand.html