检索单个列 select prod_name from products; 检索多个列 select prod_id, prod_name, prod_price from products; 检索所有列 select * from products; 检索不同的行 select distinct vend_id from products; 限制结果 返回前3条结果 select prod_name from products limit 3; 返回从第5条开始的3条结果 select prod_name from products limit 5,3; select prod_name from products limit 3 offset 5; 完全限定的表名 select products.prod_name from test.products; 1. distinct关键字 去重复 2. limit关键字 limit y 其中y表示检索的最多行数 limit x,y 其中x表示从x个开始,y表示检索的行数 3. offset关键字 limit y offset x 其中x表示从x个开始,y表示检索的行数
MySQL数据检索
1. MySQL数据检索
检索单个列
select prod_name from products;
检索多个列
select prod_id, prod_name, prod_price from products;
检索所有列
select * from products;
检...
1. MySQL数据检索
- 发表于 2018-09-17 23:43
- 阅读 ( 345 )
- 分类:网络文章
你可能感兴趣的文章
- 【赵强老师】什么是Oracle的数据字典? 180 浏览
- CentOS 8 安装 MariaDB 124 浏览
- MySQL 面试题 24 问 107 浏览
- 【赵强老师】MySQL高可用架构:MHA 164 浏览
- MySQL:java实体类生成数据库 142 浏览
- 1、MySQL常见的操作命令 139 浏览
随机文章
- jquery实现微信长按识别二维码 858 浏览
- js获取网页高度、body高度、分辨率高度、屏幕高度(详细整理) 1187 浏览
- 77d18f4906a1f621d7f158ba4a249b59 722 浏览
- Spring测试类运行时候的No tests found matching [{ExactMatcher:fDisplayName=getBasicIn]异常终极解决方案 2127 浏览
- Spring相同类型多个实例化时候的Autowired异常:No qualifying bean of type [xxxxx] is defined: expected single matching bean but found 4 1975 浏览
相关问题
条评论
请先 登录 后评论
发送私信
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!