use myblog; -- show tables -- 插入语句 -- insert into users(username,`password`,realname) values('遥远','123','ooo'); -- 查询users所有列 -- select *from users; -- 查询id username 列 -- select id, username from users; -- 查询 user表 username=zhangsan -- select *from users where username='zhangsan'; -- select *from users where username='zhangsan' and password='123'; -- 模糊查询 -- select *from users where username like'%zh%'; -- 倒着排列 select *from users where password like '%1%' order by id desc;