当前位置:网站首页>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、找出书名中字数最多的一本书,不含空格
边栏推荐
- Introduction to the implementation principle of rxjs observable filter operator
- Brief analysis of tensorboard visual processing cases
- 网上开户哪家证券公司佣金最低,我要开户,网上客户经理开户安全吗
- Anan's doubts
- Unable to stop it, domestic chips have made another breakthrough, and some links have reached 4nm
- 双链笔记 RemNote 综合评测:快速输入、PDF 阅读、间隔重复/记忆
- json序列化时案例总结
- Field problems in MySQL
- php 迷宫游戏
- 8 Queen question
猜你喜欢

Flutter动态化 | Fair 2.5.0 新版本特性

AI scores 81 in high scores. Netizens: AI model can't avoid "internal examination"!
![[how to solve FAT32 when the computer is inserted into the U disk or the memory card display cannot be formatted]](/img/95/09552d33d2a834af4d304129714775.png)
[how to solve FAT32 when the computer is inserted into the U disk or the memory card display cannot be formatted]

Libuv Library - Design Overview (Chinese version)

Mycms we media mall v3.4.1 release, user manual update

8皇后问题

SQL Injection (GET/Search)

PhpMyAdmin stage file contains analysis traceability

PowerPoint 教程,如何在 PowerPoint 中將演示文稿另存為視頻?

The solution of Chinese font garbled code in keil5
随机推荐
掌握Cypress命令行选项,是真正掌握Cypress的基础
The latest BSC can pay dividends. Any B usdt Shib eth dividend destruction marketing can
Which securities company has the lowest Commission for opening an account online? I want to open an account. Is it safe for the online account manager to open an account
MySQL functions and related cases and exercises
php 迷宫游戏
Typeerror resolved: argument 'parser' has incorrect type (expected lxml.etree.\u baseparser, got type)
Comprehensively develop the main channel of digital economy and digital group, and actively promote the utonmos digital Tibet market
Multi table query of MySQL - multi table relationship and related exercises
The shortage of graphics cards finally came to an end: 3070ti for more than 4000 yuan, 2000 yuan cheaper than the original price, and 3090ti
父亲和篮球
Box layout of Kivy tutorial BoxLayout arranges sub items in vertical or horizontal boxes (tutorial includes source code)
双链笔记 RemNote 综合评测:快速输入、PDF 阅读、间隔重复/记忆
The principle of human voice transformer
Error running 'application' in idea running: the solution of command line is too long
The solution of Chinese font garbled code in keil5
Field problems in MySQL
Depth and breadth first traversal of tree (regardless of binary tree)
Introduction to the implementation principle of rxjs observable filter operator
Heap structure and heap sort heapify
太阳底下无新事,元宇宙能否更上层楼?


























