当前位置:网站首页>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 ~~~
边栏推荐
- 0基础如何学习自动化测试?按照这7步一步一步来学习就成功了
- aaaaaaaaaaaaa
- Global and Chinese markets for electronic laryngoscope systems 2022-2028: Research Report on technology, participants, trends, market size and share
- Account management of MySQL
- JIT deep analysis
- 一文彻底理解评分卡开发中——Y的确定(Vintage分析、滚动率分析等)
- "Analysis of 43 cases of MATLAB neural network": Chapter 42 parallel operation and neural network - parallel neural network operation based on cpu/gpu
- Which of PMP and software has the highest gold content?
- How about Ping An lifetime cancer insurance?
- Kotlin基础学习 17
猜你喜欢

Fourier series

初识string+简单用法(二)

Didi open source Delta: AI developers can easily train natural language models

蓝桥杯单片机省赛第十届

蓝桥杯单片机省赛第六届

高性能 低功耗Cortex-A53核心板 | i.MX8M Mini

Screenshot literacy tool download and use

一天上手Aurora 8B/10B IP核(5)----从Framing接口的官方例程学起

NLog使用

Uniapp uses canvas to generate posters and save them locally
随机推荐
Work hard all day long and be alert at sunset
Global and Chinese market of gynaecological health training manikin 2022-2028: Research Report on technology, participants, trends, market size and share
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
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
What is the logical structure of database file
Kotlin basic learning 15
Basic syntax of unity script (6) - specific folder
Large screen visualization from bronze to the advanced king, you only need a "component reuse"!
How about Ping An lifetime cancer insurance?
aaaaaaaaaaaaa
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
蓝桥杯单片机数码管技巧
Xlwings drawing
Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
Download and use of the super perfect screenshot tool snipaste
潘多拉 IOT 开发板学习(RT-Thread)—— 实验1 LED 闪烁实验(学习笔记)
Unity脚本的基础语法(6)-特定文件夹
Unity脚本的基础语法(7)-成员变量和实例化
一天上手Aurora 8B/10B IP核(5)----从Framing接口的官方例程学起
[HCIA continuous update] working principle of OSPF Protocol