当前位置:网站首页>[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;边栏推荐
- It's never too late to start. The tramp transformation programmer has an annual salary of more than 700000 yuan
- Brief introduction to XHR - basic use of XHR
- 1143_ SiCp learning notes_ Tree recursion
- 强化学习基础记录
- 2022泰迪杯数据挖掘挑战赛C题思路及赛后总结
- Leetcode.3 无重复字符的最长子串——超过100%的解法
- Miscellaneous talk on May 27
- The difference between abstract classes and interfaces
- Using qcommonstyle to draw custom form parts
- The difference between overloading and rewriting
猜你喜欢

实验六 继承和多态

9. Pointer (upper)

Differences among fianl, finally, and finalize

Nuxtjs快速上手(Nuxt2)

Intensive literature reading series (I): Courier routing and assignment for food delivery service using reinforcement learning

Difference and understanding between detected and non detected anomalies

Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis

Cookie和Session的区别

A comprehensive summary of MySQL transactions and implementation principles, and no longer have to worry about interviews

7-7 7003 组合锁(PTA程序设计)
随机推荐
Relationship between hashcode() and equals()
杂谈0516
Analysis of penetration test learning and actual combat stage
记一次猫舍由外到内的渗透撞库操作提取-flag
【Numpy和Pytorch的数据处理】
Detailed explanation of redis' distributed lock principle
4. Branch statements and loop statements
Service ability of Hongmeng harmonyos learning notes to realize cross end communication
实验七 常用类的使用
Poker game program - man machine confrontation
C language Getting Started Guide
QT meta object qmetaobject indexofslot and other functions to obtain class methods attention
. How to upload XMIND files to Jinshan document sharing online editing?
FAQs and answers to the imitation Niuke technology blog project (II)
js判断对象是否是数组的几种方式
[the Nine Yang Manual] 2022 Fudan University Applied Statistics real problem + analysis
Miscellaneous talk on May 27
Brief introduction to XHR - basic use of XHR
实验九 输入输出流(节选)
Differences among fianl, finally, and finalize