{describe|desc} table_name [col_name --支持通配符%_]:<=> show columns from;该语句是为了兼容oracle而提供的
explain table_name:<=>describe table_name|show columns from table_name。
explain [extended|partions] select clause; --获取语句的执行计划
use db_name;更换当前数据库
、
prepare prepared_statement_name from {'文本常量'|文本变量};
execute prepared_statement_name [using @val1 [,@var2] [,...]];
{deallocate|drop} prepare prepared_statement_name;
create {user user_name [identified by {'plain_password'| password 'hash_password'}]} [,....]
drop user user1 [,user2] [,...]
grant {权限类型[列_列表]}_列表
on [对象类型 --{table、procedure、function}] 对象范围--{*|*.*|db_name.*|db_name.table_name|table_name|db_name.routine_name}
to {用户[可以指定新密码]}_列表
[with {各种选项--{grant option|max_{queries|updates|connections}_per_hour count|max_user_connections count}}_列表]
rename user old_user_name to new_user_name [,....]
revoke {权限类型 [表列_列表]}_列表 on [对象类型] 对象范围 from user [,....]
revoke all privileges,grant option from user [,....]
set password [for user] = {'hash_password'|password('plain_password')|old password('plain_password')}
set 不同的场合有不同功能的set
set character set
set names
set password
set transaction isolation level
set { { local | session | @@local. | @@session. | @@ }system_var | { global | @@global. }system_var } | user_var} = {newvalue|default} [,.....]
show 不同的场合有不同的功能 真是太丰富了!
flush [no_write_to_binlog|local] flush_options[,....]
reset query cache --清除所有的结果cache
kill {connection(默认)|query} thread_id --杀死指定连接;取消指定连接的查询操作