当前位置:网站首页>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 ~~~
边栏推荐
- The 7th Blue Bridge Cup single chip microcomputer provincial competition
- 蓝桥杯单片机省赛第十一届第一场
- [HCIA continuous update] working principle of OSPF Protocol
- Global and Chinese market of gynaecological health training manikin 2022-2028: Research Report on technology, participants, trends, market size and share
- This article describes the step-by-step process of starting the NFT platform project
- MySQL之账号管理
- Detailed explanation of ThreadLocal
- Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
- [golang] leetcode intermediate bracket generation & Full Permutation
- What is the binding path of SAP ui5
猜你喜欢

近段时间天气暴热,所以采集北上广深去年天气数据,制作可视化图看下

It took me only 3 months to jump out of the comfort zone and become an automated test engineer for 5 years

Failed to upgrade schema, error: “file does not exist

How to establish its own NFT market platform in 2022

Failed to upgrade schema, error: “file does not exist

滴滴开源DELTA:AI开发者可轻松训练自然语言模型

Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes

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

Screenshot literacy tool download and use

蓝桥杯单片机省赛第六届
随机推荐
蓝桥杯单片机省赛第十二届第一场
KL divergence is a valuable article
MySQL connection query and subquery
蓝桥杯单片机省赛第七届
Global and Chinese market of handheld ultrasonic scanners 2022-2028: Research Report on technology, participants, trends, market size and share
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
VS2010插件NuGet
One of the future trends of SAP ui5: embrace typescript
Kubernetes cluster storageclass persistent storage resource core concept and use
ImageAI安装
Global and Chinese markets for infant care equipment, 2022-2028: Research Report on technology, participants, trends, market size and share
蓝桥杯单片机省赛第五届
高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
接口调试工具模拟Post上传文件——ApiPost
Uniapp uses canvas to generate posters and save them locally
Unity脚本的基础语法(6)-特定文件夹
Work hard all day long and be alert at sunset
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
h5中的页面显示隐藏执行事件
蓝桥杯单片机第四届省赛