当前位置:网站首页>[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;
边栏推荐
- 受检异常和非受检异常的区别和理解
- String ABC = new string ("ABC"), how many objects are created
- 1143_ SiCp learning notes_ Tree recursion
- 实验五 类和对象
- Custom RPC project - frequently asked questions and explanations (Registration Center)
- 7-7 7003 组合锁(PTA程序设计)
- 深度强化文献阅读系列(一):Courier routing and assignment for food delivery service using reinforcement learning
- Miscellaneous talk on May 14
- Leetcode.3 无重复字符的最长子串——超过100%的解法
- [the Nine Yang Manual] 2019 Fudan University Applied Statistics real problem + analysis
猜你喜欢
随机推荐
Mortal immortal cultivation pointer-1
抽象类和接口的区别
一段用蜂鸣器编的音乐(成都)
A piece of music composed by buzzer (Chengdu)
About the parental delegation mechanism and the process of class loading
Programme de jeu de cartes - confrontation homme - machine
Poker game program - man machine confrontation
【九阳神功】2016复旦大学应用统计真题+解析
Reinforcement learning series (I): basic principles and concepts
[modern Chinese history] Chapter 9 test
7-7 7003 组合锁(PTA程序设计)
Miscellaneous talk on May 14
Meituan dynamic thread pool practice ideas, open source
Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
js判断对象是否是数组的几种方式
[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
撲克牌遊戲程序——人機對抗
实验八 异常处理
FAQs and answers to the imitation Niuke technology blog project (III)
8. C language - bit operator and displacement operator