查询:
select * from database.table_name where field="";
select a.field1, b.field3 field_name from database1.table_name1 a left join database2.table_name2 on a.field1=b.field2;
select count(field1) from database.table_name where field2="";
select * from database.table_name where field="" group by field2 having count(*)>1;
select * from database.table_name1 a, database.table_name2 where a.field2=b.field2 and field3="";
创建表:
create table table_name (column_name, column type, column_name2, column type2);
更新表:
alert table modify column_name column_type not null;
删除表:
drop table table_name;
插入表记录:
insert into table(column_name) vlaue ();
更新表记录:
update table set field1=“” where;
删除表记录:
delete from table where;
查看当前进程:
show processlist;
查看master数据库当前正在使用的二进制日志及当前执行二进制日志位置:
show master status;
show master logs;
show variables like '%max_connections%'; 查看最大连接数
show status like 'Threads%';