首页 > 数据库技术 > 详细

mysql常用命令

时间:2019-12-06 16:43:45      阅读:97      评论:0      收藏:0      [点我收藏+]
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;

 

mysql常用命令

原文:https://www.cnblogs.com/hack-ing/p/11996112.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!