当前位置:网站首页>[insert, modify and delete data in the headsong educator data table]
[insert, modify and delete data in the headsong educator data table]
2022-07-06 13:53:00 【Fu Ying ('▿')】
1、 Our mission : stay library Database reader Insert a piece of data into the data table
full name xm For Lin tuantuan , Phone number dhhm by 13507311234, The other fields take the default value
Display all data of the data table
use library;
# Code start
insert into reader (xm,dhhm) values(' Lin tuantuan ',13507311234);
select * from reader;
# Code end
2、 Our mission :
stay reader Insert a reader into the data table
The reader ID number is 2, The name is Chen Jie , Gender is female , Identity is teaching and research staff , The phone number is 13319551234
Tips :reader The order of each field in the data table is dzzh,xm,xb,sf,dhhm
use library;
# Code start
insert into reader (dzzh,xm,xb,sf,dhhm) values(2,' Chen Jie ',' Woman ',' academic staff ',13319551234);
# Code end
select * from reader;
3、 Our mission : stay reader Insert multiple pieces of data into the data table
The name is Huang Xiaoxiao , Gender is male , Identity is graduate , The phone is 13316789987
His name is Liu Daren , Gender is male , Identity is staff , Telephone 18012341234
The name is dengchaoyang , Gender is female , Identity is graduate , The phone is 17716554432
Tips : Data sheet reader The name of 、 Gender 、 identity 、 The phone number field is xm,xb,sf,dhhm
The reader ID is a self incrementing field , Its value will be automatically generated
use library;
# Code start
insert into reader (xm,xb,sf,dhhm) values(' Huang Xiaoxiao ',' male ',' Graduate student ',13316789987);
insert into reader (xm,xb,sf,dhhm) values(' Liu Daren ',' male ',' Personnel ',18012341234);
insert into reader (xm,xb,sf,dhhm) values(' Chao Yang Deng ',' Woman ',' Graduate student ',17716554432);
# Code end
select * from reader;
4、 Our mission : take reader Lin tuantuan in the data sheet xm The phone number of dhhm It is amended as follows 17718991989
use library;
# Code start
update reader set dhhm=17718991989 where xm=' Lin tuantuan ';
# Code end
select * from reader;
5、 Our mission : Modify the reader table reader Chen Jie xm The phone number of dhhm by 13315667745
As a staff member
use library;
# Code start
update reader set dhhm=13315667745,sf=' Personnel ' where xm=' Chen Jie ';
# Code end
select * from reader;
6、 Our mission : Put every reader reader Your reader card dzzh Number plus ten
use library;
# Code start
update reader set dzzh=dzzh+10;
# Code end
select * from reader;
7、 Our mission : Delete readers reader Chen Jie in the data sheet xm
use library;
# Code start
delete from reader where xm=' Chen Jie ';
# Code end
select * from reader;
8、 Our mission : Delete readers reader All graduate students in sf
use library;
# Code start
delete from reader where sf=' Graduate student ';
# Code end
select * from reader;
9、 Our mission : Delete all readers reader
use library;
# Code start
Truncate reader;
# Code end
select * from reader;
边栏推荐
- Caching mechanism of leveldb
- MATLAB打开.m文件乱码解决办法
- It's never too late to start. The tramp transformation programmer has an annual salary of more than 700000 yuan
- Write a program to simulate the traffic lights in real life.
- Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
- 杂谈0516
- 实验八 异常处理
- Service ability of Hongmeng harmonyos learning notes to realize cross end communication
- hashCode()与equals()之间的关系
- 【九阳神功】2018复旦大学应用统计真题+解析
猜你喜欢
2. First knowledge of C language (2)
Meituan dynamic thread pool practice ideas, open source
[dark horse morning post] Shanghai Municipal Bureau of supervision responded that Zhong Xue had a high fever and did not melt; Michael admitted that two batches of pure milk were unqualified; Wechat i
canvas基础2 - arc - 画弧线
PriorityQueue (large root heap / small root heap /topk problem)
Custom RPC project - frequently asked questions and explanations (Registration Center)
Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
1. First knowledge of C language (1)
Leetcode. 3. Longest substring without repeated characters - more than 100% solution
The difference between cookies and sessions
随机推荐
撲克牌遊戲程序——人機對抗
[面试时]——我如何讲清楚TCP实现可靠传输的机制
FAQs and answers to the imitation Niuke technology blog project (I)
MySQL中count(*)的实现方式
2022泰迪杯数据挖掘挑战赛C题思路及赛后总结
Miscellaneous talk on May 27
强化学习系列(一):基本原理和概念
[modern Chinese history] Chapter 6 test
【黑马早报】上海市监局回应钟薛高烧不化;麦趣尔承认两批次纯牛奶不合格;微信内测一个手机可注册俩号;度小满回应存款变理财产品...
. How to upload XMIND files to Jinshan document sharing online editing?
【educoder数据库实验 索引】
Mortal immortal cultivation pointer-1
4. Branch statements and loop statements
为什么要使用Redis
7-8 7104 约瑟夫问题(PTA程序设计)
This time, thoroughly understand the MySQL index
Record a penetration of the cat shed from outside to inside. Library operation extraction flag
The difference between abstract classes and interfaces
A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews
Redis的两种持久化机制RDB和AOF的原理和优缺点