当前位置:网站首页>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
边栏推荐
- Go context basic introduction
- What are the advantages of automation?
- Global and Chinese markets of thrombography hemostasis analyzer (TEG) 2022-2028: Research Report on technology, participants, trends, market size and share
- Golang defer
- Golang Modules
- Global and Chinese PCB function test scale analysis and development prospect planning report Ⓑ 2022 ~ 2027
- SQL replying to comments
- Investment analysis and future production and marketing demand forecast report of China's paper industry Ⓥ 2022 ~ 2028
- 2022-2028 research and trend analysis report on the global edible essence industry
- Global and Chinese markets of water heaters in Saudi Arabia 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
Web端自动化测试失败原因汇总

Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310

Leetcode (Sword finger offer) - 35 Replication of complex linked list

MATLAB小技巧(25)竞争神经网络与SOM神经网络

AMLOGIC gsensor debugging

C language pointer interview question - the second bullet

Write a mobile date selector component by yourself

pcl::fromROSMsg报警告Failed to find match for field ‘intensity‘.

Summary of small program performance optimization practice
What are the advantages of automation?
随机推荐
In the case of easyUI DataGrid paging, click the small triangle icon in the header to reorder all the data in the database
Global and Chinese market of sampler 2022-2028: Research Report on technology, participants, trends, market size and share
Analysis report on the development status and investment planning of China's modular power supply industry Ⓠ 2022 ~ 2028
Logstack configuration details -- elasticstack (elk) work notes 020
How to display √ 2 on the command line terminal ̅? This is actually a blog's Unicode test article
AMLOGIC gsensor debugging
Write a jison parser from scratch (2/10): learn the correct posture of the parser generator parser generator
2022-2028 global gasket plate heat exchanger industry research and trend analysis report
技术管理进阶——如何设计并跟进不同层级同学的绩效
SQL replying to comments
Kubernetes CNI 插件之Fabric
2022-2028 global optical transparency industry research and trend analysis report
Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]
2022-2028 global elastic strain sensor industry research and trend analysis report
JDBC and MySQL database
"How to connect the Internet" reading notes - FTTH
Write a jison parser from scratch (6/10): parse, not define syntax
PHP book borrowing management system, with complete functions, supports user foreground management and background management, and supports the latest version of PHP 7 x. Database mysql
Deadlock in channel
Four common methods of copying object attributes (summarize the highest efficiency)