当前位置:网站首页>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 ~~~
边栏推荐
- 高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
- What kind of interview is more effective?
- Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
- The 7th Blue Bridge Cup single chip microcomputer provincial competition
- 近段时间天气暴热,所以采集北上广深去年天气数据,制作可视化图看下
- MySQL index, transaction and storage engine
- [punch in] flip the string (simple)
- 滴滴开源DELTA:AI开发者可轻松训练自然语言模型
- Kotlin 基础学习13
- Which of PMP and software has the highest gold content?
猜你喜欢
Gradle foundation | customize the plug-in and upload it to jitpack
焱融看 | 混合雲時代下,如何制定多雲策略
Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini
It took me only 3 months to jump out of the comfort zone and become an automated test engineer for 5 years
[yolo3d]: real time detection of end-to-end 3D point cloud input
MySQL connection query and subquery
Review materials of project management PMP high frequency examination sites (8-1)
MD5 of Oracle
潘多拉 IOT 开发板学习(RT-Thread)—— 实验1 LED 闪烁实验(学习笔记)
一文彻底理解评分卡开发中——Y的确定(Vintage分析、滚动率分析等)
随机推荐
What is the logical structure of database file
Oracle的md5
微信小程序中 在xwml 中使用外部引入的 js进行判断计算
Go execute shell command
FFMpeg AVFrame 的概念.
Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
Global and Chinese markets for infant care equipment, 2022-2028: Research Report on technology, participants, trends, market size and share
Blue Bridge Cup SCM digital tube skills
Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
C # joint Halcon's experience of breaking away from Halcon environment and various error reporting solutions
Basic syntax of unity script (8) - collaborative program and destruction method
[C Advanced] brother Peng takes you to play with strings and memory functions
Kotlin基础学习 16
In depth interpretation of pytest official documents (26) customized pytest assertion error information
ImageAI安装
Getting started with MQ
汇率的查询接口
Blue Bridge Cup single chip microcomputer sixth temperature recorder
NLog使用
Xlwings drawing