当前位置:网站首页>[experiment index of educator database]
[experiment index of educator database]
2022-07-06 13:53:00 【Fu Ying ('▿')】
1、 Mission requirements
stay sale In the database , Establish supplier data sheet
gys, Including supplier name gysh Character 4 position 、 Corporate name Variable length character type 20 position 、 Telephone Variable length character type 11 position 、 Address Variable length character type 20 position 、 Contacts Variable length character type 4 position 、 mobile phone Character 11 position Field , At the same time, the main index is established according to the supplier number field .
Display in rows gyh Index of data table
use sale;
# Code start
create table gyh
(
gysh char(4) primary key,
Name varchar(20),
telephone varchar(11),
address varchar(20),
contact varchar(4),
mobile char(11)
);
show index from gyh;
# Code end
2、 Mission :
The first question is
stay xsdmx The data sheet is numbered according to the sales order xsdh And serial number xh Two fields establish the primary index xsdxh
The second question is
stay xsdmx The data sheet is based on the commodity number sph Field to build a general index sphsy.
Third question
In commodities sp The data sheet is based on the trade name spm Field to establish a unique index spmsy.
use sale
# Code start
# The first question is
alter table xsdmx add primary key(xsdh,xh);
# The second question is
create index sphsy on xsdmx(sph);
# Third question
create unique index spmsy on sp(spm);
# Code end
show index in xsdmx\g;
show index in sp\g;
3、 Delete sp Index of commodity data sheet spmsy
The command format of deleting the index
use sale;
# Code start
alter table sp drop index spmsy;
# Code end
show index in sp\g;
边栏推荐
- 一段用蜂鸣器编的音乐(成都)
- 7-5 走楼梯升级版(PTA程序设计)
- 2022 Teddy cup data mining challenge question C idea and post game summary
- 撲克牌遊戲程序——人機對抗
- Yugu p1012 spelling +p1019 word Solitaire (string)
- PriorityQueue (large root heap / small root heap /topk problem)
- Analysis of penetration test learning and actual combat stage
- 附加简化版示例数据库到SqlServer数据库实例中
- Canvas foundation 1 - draw a straight line (easy to understand)
- Difference and understanding between detected and non detected anomalies
猜你喜欢
FAQs and answers to the imitation Niuke technology blog project (III)
(原创)制作一个采用 LCD1602 显示的电子钟,在 LCD 上显示当前的时间。显示格式为“时时:分分:秒秒”。设有 4 个功能键k1~k4,功能如下:(1)k1——进入时间修改。
Caching mechanism of leveldb
PriorityQueue (large root heap / small root heap /topk problem)
深度强化文献阅读系列(一):Courier routing and assignment for food delivery service using reinforcement learning
4. Branch statements and loop statements
强化学习系列(一):基本原理和概念
hashCode()与equals()之间的关系
Service ability of Hongmeng harmonyos learning notes to realize cross end communication
Leetcode.3 无重复字符的最长子串——超过100%的解法
随机推荐
【九阳神功】2018复旦大学应用统计真题+解析
【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...
Differences among fianl, finally, and finalize
Have you encountered ABA problems? Let's talk about the following in detail, how to avoid ABA problems
Intensive literature reading series (I): Courier routing and assignment for food delivery service using reinforcement learning
Inaki Ading
String ABC = new string ("ABC"), how many objects are created
FAQs and answers to the imitation Niuke technology blog project (I)
Using qcommonstyle to draw custom form parts
3. Input and output functions (printf, scanf, getchar and putchar)
7-11 机工士姆斯塔迪奥(PTA程序设计)
(original) make an electronic clock with LCD1602 display to display the current time on the LCD. The display format is "hour: minute: Second: second". There are four function keys K1 ~ K4, and the fun
1. First knowledge of C language (1)
仿牛客技术博客项目常见问题及解答(一)
扑克牌游戏程序——人机对抗
[au cours de l'entrevue] - Comment expliquer le mécanisme de transmission fiable de TCP
5月27日杂谈
深度强化文献阅读系列(一):Courier routing and assignment for food delivery service using reinforcement learning
Implementation of count (*) in MySQL
仿牛客技术博客项目常见问题及解答(三)