表结构查询、还原库、查询非空字段、删除表中指定字段数据、修改数据、查看所有用户权限

表结构查询  1、describe student;

       2、show columns from student;

                 3、Show creat table student;

 

还原库 mysql> source /data/lgj.msql

 

查询field的非空 select * from table_name where field != ‘’;

 

删除标中数据,Delete from table_name where id=3;

                     不加where则是删除整张表数据

 

修改数据 update runb_tol set runb_til=‘xuexi’ where id=3;

 

查看所有用户权限 SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;

猜你喜欢

转载自www.cnblogs.com/lgj8/p/12070812.html