当前位置:首页 / 文章测试 / mysql常用命令练习

mysql常用命令练习

开始打字练习

create user haige@'%' identified by '123456'

grant all privileges on *.* to haige@'%' identified by '123456';

grant all privileges on *.* to haige@'%' identified by '123456';

SET PASSWORD FOR 'haige6'@'192.168.10.%' = PASSWORD('123456');

flush privileges;

drop user haige@'192.168.10.%';

show databases;

create database king;

use king;

show tables;

create table if not exists tanks1 ( id int(12) not null default '0', name varchar(255) not null, skills varchar(255) not null, price int(11) not null, primary key (id) )engine=innodb default charset=uutf8;

insert into tanks1 (id,name,skills,price) values (2,'zhouwan','123234w大招回血','88');

select * from tank1;

select * from king.tanks1 order by price;

select * from king.tanks1 order by price desc;

delete from table名 where 列名='列值';

delete from table名;

update king.tanks1 set name=123 where name="猪八戒";

show create tables tanks1;

show create database king;

truncate from table;

drop table tanks1;

drop database king;

声明:以上文章均为用户自行发布,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。