当前位置:网站首页>MySQL develops small mall management system
MySQL develops small mall management system
2022-07-04 09:42:00 【Stay a little star】
One 、MySQL workbench Use
1、 open MySQL workbench The main interface of can be seen 
2、 Connect to the existing database ( For example, the local instance mysql 80)
The password when connecting is set during installation , You can only use this machine without designing a password , Fill in the pop-up interface sql After the connection information of the database, click “Test connection” Can test connection . After successful connection, skip to the following page .
Upper figure 124 Three areas are commonly used :
① Area 1“Navigator” Of “Administration” Are links to some common functions . and Schemas It's like a database , The database we will write later can be found in schemas see . The area in the figure above 1 What exists is the name of the database that has been created .
② Area 4 Displays the relevant information of the currently operated database and its tables 
③ Area 2 For writing SQL, Conduct data operation, etc 
3、 Create database
Click on schemas, Then right-click in the blank to select create schemas, In this way, you can create a new database , Fill in the database name and charset/collation I can click Apply To create (charset/collation Can be adjusted according to their own needs 、 I used it here utf-8 Of charset). As long as you don't report mistakes, you'll go all the way Apply That's it .
After success Navigator In the view 
These files store tables separately 、 View 、 stored procedure 、 Method .
4、 Create a table
Right click tables choice create table You can create a new table 
Fill in... In turn Table Name and charset、engine etc. ( frequently-used engine Yes InnoDB and MyISAM). After filling in the information of the entity, fill in the attribute information below :
PK:primary key Primary key
NN:not null Non empty
UQ:unique unique index
BIN:binary binary data ( Than text Bigger )
UN:unsigned Unsigned ( Nonnegative number )
ZF:zero fill fill 0 For example, the field content is 1 int(4), The content is displayed as 0001
AI:auto increment Self increasing
After selecting, click Apply, Automatically generate related sql Statement to create a table .
5、 Add data
stay Navigator Find the newly created table , Click the lightning sign to enter the data adding interface :
add to 、 Click... After making changes Apply You can save it to the database .
We'll use query Page to check the database we created and its saved data :
Got the data we just saved .yeah!
**** Some commonly used database operation instructions :
1、 Database operation
show databases; // List databases
use database_name // Use database_name database
create database data_name // Create a data_name The database of
drop database data_name // Delete one named data_name The database of
2、 Table operations
show tables // List all the tables
create talbe tab_name(id int(10) not null auto_increment primary key,name varchar(40),pwd varchar(40)) charset=gb2312; Create a file called tab_name New table of
drop table tab_name Delete the name tab_name Data sheet for
describe tab_name // The display name is tab_name The data structure of the table
show columns from tab_name // ditto
delete from tab_name // Will table tab_name The records in are cleared
select * from tab_name // Display table tab_name Records in
边栏推荐
- ArrayBuffer
- Regular expression (I)
- 查看CSDN个人资源下载明细
- Baidu R & D suffered Waterloo on three sides: I was stunned by the interviewer's set of combination punches on the spot
- Golang Modules
- Normal vector point cloud rotation
- 华为联机对战如何提升玩家匹配成功几率
- Qtreeview+ custom model implementation example
- 2022-2028 global special starch industry research and trend analysis report
- Flutter 小技巧之 ListView 和 PageView 的各種花式嵌套
猜你喜欢

百度研发三面惨遭滑铁卢:面试官一套组合拳让我当场懵逼

2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
自动化的优点有哪些?

2022-2028 global industrial gasket plate heat exchanger industry research and trend analysis report

2022-2028 research and trend analysis report on the global edible essence industry

2022-2028 global visual quality analyzer industry research and trend analysis report

mmclassification 标注文件生成

C # use gdi+ to add text to the picture and make the text adaptive to the rectangular area

Kubernetes CNI 插件之Fabric

C # use gdi+ to add text with center rotation (arbitrary angle)
随机推荐
After unplugging the network cable, does the original TCP connection still exist?
Summary of the most comprehensive CTF web question ideas (updating)
Luogu deep foundation part 1 Introduction to language Chapter 4 loop structure programming (2022.02.14)
华为联机对战如何提升玩家匹配成功几率
Analysis report on the production and marketing demand and investment forecast of tellurium dioxide in the world and China Ⓣ 2022 ~ 2027
How does idea withdraw code from remote push
Global and Chinese trisodium bicarbonate operation mode and future development forecast report Ⓢ 2022 ~ 2027
Pueue data migration from '0.4.0' to '0.5.0' versions
法向量点云旋转
Hands on deep learning (35) -- text preprocessing (NLP)
Hands on deep learning (34) -- sequence model
回复评论的sql
Lauchpad x | MODE
lolcat
Normal vector point cloud rotation
Write a jison parser from scratch (1/10):jison, not JSON
Fatal error in golang: concurrent map writes
Development trend and market demand analysis report of high purity tin chloride in the world and China Ⓔ 2022 ~ 2027
智慧路灯杆水库区安全监测应用
At the age of 30, I changed to Hongmeng with a high salary because I did these three things