当前位置:网站首页>MySQL 数据增删改查综合案例
MySQL 数据增删改查综合案例
2022-07-03 13:17:00 【陈弋辛】
目录
5、将名称为EmmaT的书的价格改为40,并将说明改为drama。
10、查询图书信息,按照库存量降序排列,如果库存量相同的按照note升序排列
12、按照note分类统计书的库存量,显示库存量超过30本的
16、查询书名和类型,其中note值为novel显示小说,law显示法律,medicine显示医药,cartoon显示卡通,joke显示笑话
17、查询书名、库存,其中num值超过30本的,显示滞销,大于0并低于10的,显示畅销,为0的显示需要无货
数据增删改查综合案例
1、创建数据库test01_library
2、创建表 books,表结构如下:
3、向books表中插入记录
1)不指定字段名称,插入第一条记录
2)指定所有字段名称,插入第二记录
3)同时插入多条记录(剩下的所有记录)
4、将小说类型(novel)的书的价格都增加5。
5、将名称为EmmaT的书的价格改为40,并将说明改为drama。
6、删除库存为0的记录。
7、统计书名中包含a字母的书
8、统计书名中包含a字母的书的数量和库存总量
9、找出“novel”类型的书,按照价格降序排列
10、查询图书信息,按照库存量降序排列,如果库存量相同的按照note升序排列
11、按照note分类统计书的数量
12、按照note分类统计书的库存量,显示库存量超过30本的
13、查询所有图书,每页显示3本,显示第二页
14、按照note分类统计书的库存量,显示库存量最多的
15、查询书名达到9个字符的书,不包括里面的空格
16、查询书名和类型,其中note值为novel显示小说,law显示法律,medicine显示医药,cartoon显示卡通,joke显示笑话
17、查询书名、库存,其中num值超过30本的,显示滞销,大于0并低于10的,显示畅销,为0的显示需要无货
18、统计每一种note的库存量,并合计总量
19、统计每一种note的数量,并合计总量
20、统计库存量前三名的图书
21、找出最早出版的一本书
22、找出novel中价格最高的一本书
23、找出书名中字数最多的一本书,不含空格
边栏推荐
- Unable to stop it, domestic chips have made another breakthrough, and some links have reached 4nm
- 网上开户哪家证券公司佣金最低,我要开户,网上客户经理开户安全吗
- Unity EmbeddedBrowser浏览器插件事件通讯
- Flutter动态化 | Fair 2.5.0 新版本特性
- 父亲和篮球
- SQL Injection (GET/Search)
- php 迷宫游戏
- Flutter动态化 | Fair 2.5.0 新版本特性
- Kivy tutorial how to load kV file design interface by string (tutorial includes source code)
- [556. Next larger element III]
猜你喜欢
When updating mysql, the condition is a query
Go language unit test 3: go language uses gocovey library to do unit test
JVM系列——概述,程序计数器day1-1
Unable to stop it, domestic chips have made another breakthrough, and some links have reached 4nm
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
User and group command exercises
挡不住了,国产芯片再度突进,部分环节已进到4nm
Unity embeddedbrowser browser plug-in event communication
rxjs Observable filter Operator 的实现原理介绍
The solution of Chinese font garbled code in keil5
随机推荐
Anan's doubts
Kivy教程之 如何通过字符串方式载入kv文件设计界面(教程含源码)
Leetcode-1175.Prime Arrangements
Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:
Start signing up CCF C ³- [email protected] chianxin: Perspective of Russian Ukrainian cyber war - Security confrontation and sanctions g
Comprehensive evaluation of double chain notes remnote: fast input, PDF reading, interval repetition / memory
Setting up remote links to MySQL on Linux
Field problems in MySQL
软件测试工作那么难找,只有外包offer,我该去么?
[understanding by chance-37]: the structure of human sensory system determines that human beings are self-centered
PHP maze game
Screenshot of the operation steps of upload labs level 4-level 9
windos 创建cordova 提示 因为在此系统上禁止运行脚本
MapReduce implements matrix multiplication - implementation code
掌握Cypress命令行选项,是真正掌握Cypress的基础
Disruptor -- a high concurrency and high performance queue framework for processing tens of millions of levels
Box layout of Kivy tutorial BoxLayout arranges sub items in vertical or horizontal boxes (tutorial includes source code)
User and group command exercises
Universal dividend source code, supports the dividend of any B on the BSC
Ubuntu 14.04 下开启PHP错误提示