当前位置:网站首页>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 ~~~
边栏推荐
- Blue Bridge Cup SCM digital tube skills
- PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
- In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
- 蓝桥杯单片机省赛第五届
- C # joint halcon out of halcon Environment and various Error Reporting and Resolution Experiences
- In the era of programmers' introspection, five-year-old programmers are afraid to go out for interviews
- 蓝桥杯单片机省赛第十届
- 高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
- Getting started with MQ
- Basic syntax of unity script (8) - collaborative program and destruction method
猜你喜欢

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

Review materials of project management PMP high frequency examination sites (8-1)

What do you know about stock selling skills and principles

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

跳出舒适区,5年点工转型自动化测试工程师,我只用了3个月时间

The 6th Blue Bridge Cup single chip microcomputer provincial competition

Sentry experience and architecture, a fledgling monitoring product with a market value of $100million

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

MySQL之账号管理

Pointer array & array pointer
随机推荐
Qt的网络连接方式
0基础如何学习自动化测试?按照这7步一步一步来学习就成功了
蓝桥杯单片机省赛第六届
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
js生成随机数
[mv-3d] - multi view 3D target detection network
Oracle viewing locked tables and unlocking
h5中的页面显示隐藏执行事件
Global and Chinese market of X-ray detectors 2022-2028: Research Report on technology, participants, trends, market size and share
VS2010 plug-in nuget
The 5th Blue Bridge Cup single chip microcomputer provincial competition
Aaaaaaaaaaaa
Pointer array & array pointer
《MATLAB 神經網絡43個案例分析》:第42章 並行運算與神經網絡——基於CPU/GPU的並行神經網絡運算
MySQL index, transaction and storage engine
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
【DesignMode】原型模式(prototype pattern)
【DesignMode】建造者模式(Builder model)
Pycharm2021 delete the package warehouse list you added
What kind of interview is more effective?