当前位置:网站首页>Basic operations of MySQL database (based on tables)
Basic operations of MySQL database (based on tables)
2022-07-02 03:39:00 【Bloom_ 001】
- Create table
- See the table ( View fields )
- Insert elements into the table
- Modify the name of the table
- Delete table
First, let's take a look at the official definition of table : Table in ACCESS in , surface (TABLE) Is the object used to store data in the database , Is a collection of structured data , It is the foundation of the whole database system .
In everyday life , Watches are no stranger to us . Tables are organized in rows and columns . For example, the usual worksheet

Each line is a unique record , Each column represents a field in the record .
One Create table .
create table Table name (
Field name 1 type ,
Field name 2 type ,
Field name 3 type ,
Field name 4 type
);for example : Create a name test Table of , Then look at the table

Two See the table ( View fields )
Command statement desc Table name ;
desc test;

3、 ... and Insert elements into the table
Code :
standard insert into Table name
( Field 1, Field 2)
value
( Inserted value 1, Inserted value 2);
insert into test
(age,name)
value
(18," Zhang San ");Check the contents of the table
select * from Table name ;
select * from test;

Four Modify table ( The modification indicates )
1. rename table The old name of the table to The new name of the table ;
rename table test to test_01;

2.
alter table The old name of the table The new name of the table

5、 ... and Delete table ( Need to be deleted carefully , Delete reference safely :MySQL database ------ Common database commands ( database-based )_Bloom_001 The blog of -CSDN Blog )
drop table Table name ;
drop table test_01;

------------------------------------------------------------------------------------------------------------------------------
Ongoing update ~~~
边栏推荐
- Oracle viewing locked tables and unlocking
- [untitled] basic operation of raspberry pie (2)
- < job search> process and signal
- Global and Chinese market of autotransfusion bags 2022-2028: Research Report on technology, participants, trends, market size and share
- 蓝桥杯单片机省赛第十届
- What do you know about stock selling skills and principles
- Get started with Aurora 8b/10b IP core in one day (5) -- learn from the official routine of framing interface
- Download and use of the super perfect screenshot tool snipaste
- 初识string+简单用法(二)
- In depth analysis of C language - variable error prone knowledge points # dry goods inventory #
猜你喜欢

0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed

In the era of programmers' introspection, five-year-old programmers are afraid to go out for interviews

蓝桥杯单片机省赛第五届

蓝桥杯单片机省赛第六届

JIT deep analysis

接口调试工具模拟Post上传文件——ApiPost

The 7th Blue Bridge Cup single chip microcomputer provincial competition

蓝桥杯单片机省赛第十二届第一场

Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud

Analyse de 43 cas de réseaux neuronaux MATLAB: Chapitre 42 opérations parallèles et réseaux neuronaux - - opérations parallèles de réseaux neuronaux basées sur CPU / GPU
随机推荐
蓝桥杯单片机省赛第七届
【直播回顾】战码先锋首期8节直播完美落幕,下期敬请期待!
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
Basic syntax of unity script (6) - specific folder
Global and Chinese markets for welding equipment and consumables 2022-2028: Research Report on technology, participants, trends, market size and share
Network connection mode of QT
Interface debugging tool simulates post upload file - apipost
潘多拉 IOT 开发板学习(HAL 库)—— 实验2 蜂鸣器实验(学习笔记)
Custom classloader that breaks parental delegation
The first game of the 11th provincial single chip microcomputer competition of the Blue Bridge Cup
[designmode] Prototype Pattern
Grpc quick practice
What kind of interview is more effective?
js生成随机数
Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
JIT deep analysis
Retrofit's callback hell is really vulnerable in kotlin synergy mode
JS generate random numbers
Global and Chinese market of bone adhesives 2022-2028: Research Report on technology, participants, trends, market size and share
汇率的查询接口